#include #include class MyType { public: MyType() {} }; void ProcessMyType(MyType type) { } MyType MakeMyType() { MyType type; return type; } int main(int argc, char **argv) { // MakeMyType returns an rvalue MyType. MyType type = MakeMyType(); ProcessMyType(MakeMyType()); }