fork download
  1. #include <iostream>
  2.  
  3. struct mov {
  4. mov(){}
  5. mov(mov&&){}
  6. mov& operator=(mov&&) {return *this;}
  7. protected:
  8. mov(mov&);
  9. void operator=(mov&);
  10. };
  11.  
  12. mov&& func() {return std::move(mov());}
  13.  
  14. int main() {
  15. mov a = func();
  16. }
Success #stdin #stdout 0s 2880KB
stdin
Standard input is empty
stdout
Standard output is empty