News for hackers. Stuff that matters.
Re:Don’t blindly prefer emplace_back to push_back by gpderetta on Thursday March 04, 2021 @02:52PM (#26347292)
> He also acknowledges in section 6 that it doesn't work for non-moveable types.

Actually these days it does. Copy/Move elision is mandated by the language in this case and no valid copy/move constructor is required. Similarly is no possible to return non-movable non-copyable types from functions which opens the possibility of interesting code patternes.

There are no comments on this comment yet.