In C ++ 17, prvalues ("anonymous temporary") are no longer objects. Instead, they are instructions on how to build an object.
They can create temporary ones from their building instructions, but since there is no object there, there is no copy / move structure to execute it.
Foo myfunc(Foo foo) {
return foo;
}
, foo prvalue myfunc. , "myfunc , foo". " " , .
auto foo = myfunc(Foo());
, Foo() - prvalue. : " a foo ()". myfunc. , , ().
myfunc.
myfunc foo. prvalue ( ) auto foo.
, foo (), auto foo.
++ 14 ++ 17, ( , ). return func_arg;.