https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97814
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just for reference, C++17 includes what is called Prvalue semantics (some call
it guaranteed copy elision). Unlike previous versions of C++, where moves (and
copies) that are elisioned, also require access to the copy/move constructor,
prvalue semantics has no requirement for that as there are no tempories that
happens in this case in C++17.
You can read up more here (note this is a summary of what the standard says and
not exactly the standard but it does a decent job in talking about it):
https://en.cppreference.com/w/cpp/language/copy_elision