Weird article. In the first section the compiler (correctly, albeit unclearly) hints the student to write “widgets.emplace_back(foo, bar, baz);”.
The author then proceeds to compare widgets.push_back(std::move(w)); versus widgets.emplace_back(std::move(w));. Wat? Why is he comparing against the thing you aren’t supposed to write? That makes no sense.
The final section I can’t tell if he’s comparing compile-time or run-time. The comments make me think compile but I’m not sure?
Good topic for a blog post. But it feels like this post is sloppily mixing three different ideas. Very strange.
replies(1):