https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110507
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >The following should work since C++17, when C++ got guaranteed copy elision. Except for Defect report 2403 (https://wg21.link/cwg2403). This is a dup of bug 98995. *** This bug has been marked as a duplicate of bug 98995 ***