fork download
  1. #include <vector>
  2.  
  3. struct CopyOnly {
  4. CopyOnly() {};
  5. CopyOnly(const CopyOnly&) {};
  6. }; // declaring a copy means no implicit move.
  7.  
  8. struct Question {
  9. std::vector<int> data_;
  10. CopyOnly copyOnly_;
  11. };
  12.  
  13. int main() {
  14. Question q;
  15. Question r=q;
  16. Question x( std::move(q) );
  17. }
  18.  
Success #stdin #stdout 0s 2824KB
stdin
Standard input is empty
stdout
Standard output is empty