fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Beta_ab { int a; };
  5.  
  6. struct Beta {
  7. Beta_ab ab;
  8. Beta_ab && getAB() && { cout << "1"; return move(ab); }
  9. //Beta_ab && getAB() { cout << "2"; return move(ab); }
  10. };
  11.  
  12. int main() {
  13. //Beta b;
  14. //Beta_ab ab = b.getAB();
  15.  
  16. Beta_ab ab = Beta().getAB();
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1