fork(7) download
  1. class noncopyable
  2. {
  3. protected:
  4. noncopyable() {}
  5. ~noncopyable() {}
  6. private: // emphasize the following members are private
  7. noncopyable( const noncopyable& );
  8. const noncopyable& operator=( const noncopyable& );
  9. };
  10.  
  11. class D : noncopyable
  12. {
  13. public:
  14. D() { }
  15. D(const D&) { }
  16. };
  17.  
  18. int main()
  19. {
  20. D a;
  21. D b(a);
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty