Re:The Sad Truth About C++ Copy Elision
by ncmncm on Saturday April 03, 2021 @11:41AM
(#26681896)
Most often the least clever thing is the most clever thing. The best optimization is the one that is not needed at all.
An `std::unique_ptr<>` member is not just safer, it is also faster if it enables the compiler to generate its own various constructors and destructors.
An `std::unique_ptr<>` member is not just safer, it is also faster if it enables the compiler to generate its own various constructors and destructors.