PVData C++  8.0.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
noDefaultMethods.h
1 /* noDefaultMethods.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
9 #ifndef NO_DEFAULT_METHODS_H
10 #define NO_DEFAULT_METHODS_H
11 
12 #include <shareLib.h>
13 
35 #if __cplusplus>=201103L
36 # define EPICS_NOT_COPYABLE(CLASS) private: CLASS(const CLASS&) = delete; CLASS& operator=(const CLASS&) = delete;
37 #else
38 # define EPICS_NOT_COPYABLE(CLASS) private: CLASS(const CLASS&); CLASS& operator=(const CLASS&);
39 #endif
40 
41 namespace epics { namespace pvData {
42 
51 public:
52  NoDefaultMethods() {}
53 private:
54 #if __cplusplus>=201103L
55  NoDefaultMethods(const NoDefaultMethods&) = delete;
56  NoDefaultMethods & operator=(const NoDefaultMethods &) = delete;
57 #else
58  // do not implement
60  NoDefaultMethods & operator=(const NoDefaultMethods &);
61 #endif
62 };
63 
64 }}
65 #endif /* NO_DEFAULT_METHODS_H */
Base class for not allowing default methods.