Geant4 Cross Reference |
1 #ifndef CLHEP_NONCOPYABLE_H 1 #ifndef CLHEP_NONCOPYABLE_H 2 #define CLHEP_NONCOPYABLE_H 2 #define CLHEP_NONCOPYABLE_H 3 3 4 // =========================================== 4 // ====================================================================== 5 // 5 // 6 // noncopyable - classes directly/indirectly i 6 // noncopyable - classes directly/indirectly inheriting won't be copyable 7 // 7 // 8 // Author: W. E. Brown; 2010-03-05 8 // Author: W. E. Brown; 2010-03-05 9 // 9 // 10 // =========================================== 10 // ====================================================================== 11 11 12 12 13 #include "CLHEP/Utility/defs.h" 13 #include "CLHEP/Utility/defs.h" 14 14 15 15 16 namespace CLHEP { 16 namespace CLHEP { 17 17 18 class noncopyable 18 class noncopyable 19 { 19 { 20 protected: 20 protected: 21 noncopyable () throw () { } 21 noncopyable () throw () { } 22 ~noncopyable() throw () { } 22 ~noncopyable() throw () { } 23 23 24 private: 24 private: 25 noncopyable ( noncopyable const 25 noncopyable ( noncopyable const & ); // = delete; 26 noncopyable & operator = ( noncopyable const 26 noncopyable & operator = ( noncopyable const & ); // = delete; 27 }; // noncopyable 27 }; // noncopyable 28 28 29 } // namespace CLHEP 29 } // namespace CLHEP 30 30 31 #endif // HEP_NONCOPYABLE_H 31 #endif // HEP_NONCOPYABLE_H 32 // 32 // 33 // =========================================== 33 // ====================================================================== 34 34