#Writing a comptime code.

1 messages · Page 1 of 1 (latest)

tidal patio
#

what’s wrong with this code?

#

oh, that

#

you need to break it explicitly

#

break :blk count; and label the comptime block

tidal patio
#

you could also just use a 1 liner:
const dimension_count = @typeInfo(Vec).@“struct”.fields.len;