3 ms·
No, emplace_back is supposed to be a contract about non-copyable types. For trivially copyable types it is useless. The nuance is when types have complex or exp
by otabdeveloper4 2y ago
No, emplace_back is supposed to be a contract about non-copyable types.
For trivially copyable types it is useless.
The nuance is when types have complex or expensive rules for copying them. Here you want to be explicit about your intent w.r.t. copying.