#@offsetOf doesnt work with @Vector nither with Arrays

1 messages · Page 1 of 1 (latest)

remote talon
#

Hello there, I cant do @offsetOf([2]f32, "0") nither @offsetOf(@Vector(2, f32), "0");
But I think it should work.

#

further more I think it should also work with slices: @offsetOf([]f32, "len") @offsetOf([]f32, "ptr")

hard escarp
#

it has no field called 0

#

multiply the offset by the size of f32

hard escarp
#

you should never access a slice like that

sturdy wolf