mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
9 lines
122 B
V
9 lines
122 B
V
fn getsize<P>() u32 {
|
|
return sizeof(P)
|
|
}
|
|
|
|
fn test_sizeof_2() {
|
|
assert getsize<f64>() == 8
|
|
assert 4 == getsize<int>()
|
|
}
|