2 ms·
Yes, if f() returns the type T then you can write &(T[]){ f() } The type in brackets needs to be an array so that if f() returns a struct then the initial
by fanf2 6y ago
Yes, if f() returns the type T then you can write
&(T[]){ f() }
The type in brackets needs to be an array so that if f() returns a struct then the initializer list has the right shape. If T is a simple type then you can drop the [].