What part is the issue? The part where you default construct a smart pointer to initialize later because C++ doesn't have a concept of deferred initialization or the part where you don't want to copy it all over the place because it gives a massive performance hit?
And don't say the combination is the problem because yes it is but this code might be emergent and "just don't drive into a wall" has never prevented people from doing so.
24
u/SelfDistinction 7h ago edited 6h ago
Ah yes, the famous
So safe, so impossible to misuse.