#declaration literals
1 messages · Page 1 of 1 (latest)
yeah, .init here just reference a declaration made inside of the struct, nothing more. it’s not like a special init syntax
Aren't you able to pass .{ .thread_safe = false } into the config argument of the gpa?
err..ya, my mistake
.init should then be fine to use
What about backing_allocator, for example, though ?
I changed the original post/question
Then yeah, I think you'll need to either initialize with the init decl and then change the backing allocator or initialize each field yourself
yeah basically
not being able to do this is one of the reasons for decl literals existing
Sinon is correct that there's nothing special about .init, it's just a constant declared on GPA
it means you can't incorrectly initialize something on accident