huantran
10/8/2015 - 2:09 AM

These are macro using for disable copy and assignment operator in C++ from Google and Qt source code

These are macro using for disable copy and assignment operator in C++ from Google and Qt source code

// Google
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
  TypeName(const TypeName&);   \
  void operator=(const TypeName&) 
  
// Qt
#define Q_DISABLE_COPY(Class) \
  Class(const Class &); \     
  Class &operator=(const Class &);