3 ms·
I don't understand the emplace_back example. I don't see any copies (or moves) happening there at all, so yes, no copy elision can happen. But it doesn't make s
by Thorrez 7y ago
I don't understand the emplace_back example. I don't see any copies (or moves) happening there at all, so yes, no copy elision can happen. But it doesn't make sense to want copy elision when you already have no copies.
But yes, I don't think push_back can do full copy elision, but I don't think there's a real need, because it can use move instead of copying.