#Modifying of comptime value

1 messages · Page 1 of 1 (latest)

unkempt plover
#

That's not because it's comptime -- although it is, because you've said comptime var.
But it's because you're trying to mutate a field in push_back, but you accept the @This() by-value - which means that it's immutable.

If you want to be able to mutate the fields, have it accept a *@This() instead.

cerulean yoke
unkempt plover
#

Just make it var list =.

cerulean yoke
#

Thank you a lot!