Macro to disable the copy-constructor.

Another toolkit I use has an explicit macro for this, which is nice for readability, so I've borrowed it here.
This commit is contained in:
James Turner 2012-09-24 23:18:57 +01:00
parent 89d30acbc5
commit dc463d1c2c

View File

@ -103,4 +103,10 @@ inline void SG_NORMALIZE_RANGE( T &val, const T min, const T max ) {
// avoid an 'unused parameter' compiler warning.
#define SG_UNUSED(x) (void)x
// easy way to disable the copy constructor and assignment operator
// on an object
#define SG_DISABLE_COPY(Class) \
Class(const Class &); \
Class &operator=(const Class &);
#endif // _SG_INLINES_H