ParentFull threadphaedrus·C++ already has (named) return value optimization; I think the behavior you describe would happen when passing the result of a function to push_back/emplace_back.https://en.cppreference.com/w/cpp/language/copy_elisionView on HN