|
|
|
|
|
by jjmarr
6 days ago
|
|
> not guaranteed but allowed by the language and widely implemented Ome can make it guaranteed (assuming Foo is an aggregate) by writing: Foo make_foo() {
return Foo{.blah = 7};
}
This guarantees initialization happens at the end of the function, since you are returning a pure rvalue. Generally a good style rule to adopt and no annotations needed. |
|