fork download
  1. #include <iostream>
  2. struct S { };
  3. struct M {
  4. M(const S&) {
  5. std::cout<<"M(const S&)\n";
  6. }
  7. M(S&&) {
  8. std::cout<<"M(S&&)\n";
  9. }
  10. };
  11. M foo() {
  12. S s{}; return s;
  13. }
  14. int main() {
  15. foo();
  16. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
M(S&&)