3 ms·
A copy constructor that cannot be elided is a broken copy constructor.
by TheCoelacanth 11y ago
A copy constructor that cannot be elided is a broken copy constructor.
- ExpiredLink 11y agoThis may be true for simple structs but is definitely wrong as a general statement. Compilers cannot anticipate semantics.
- TheCoelacanth 11y agoIt is true for all copy constructors in C++ since the standard allows compilers to perform copy elision.