3 ms·
I don't think that's much of an issue. If you need deferred initialization then stick to a pointer and then once the pointer is initialized shadow it with a ref
by Maxatar 1y ago
I don't think that's much of an issue. If you need deferred initialization then stick to a pointer and then once the pointer is initialized shadow it with a reference.
int* pre_foo = null;
... initialize pre_foo ...
int& foo = *pre_foo;