EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
NoCopy.h
1 #ifndef NOCOPY_H_
2 #define NOCOPY_H_
3 
4 // Helper macro for declaring the (private) copy constructor
5 // and copy operator,
6 // with the intent of never defining it,
7 // to prevent usage of the default copy operators.
8 // See Meyer Item 27.
9 // Suggested for all classes with members that
10 // point to allocated memory.
11 
12 #define PROHIBIT_DEFAULT_COPY(CLASS) \
13  CLASS(const CLASS &); \
14  CLASS & operator = (const CLASS &)
15 
16 #endif /*NOCOPY_H_*/