You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand, the Macro UNCOPYABLE is included in estd's uncopyable.h for historical reasons?
Exactly. The UNCOPYABLE macro will be removed in the future as it is deprecated.
Instead, the base class estd::uncopyable can be used instead consequently, since using C++ means is mostly better than preprocessor means.
The current preferred way to make a class non-copyable is to declare the copy constructor and copy assignment operator as = deleted under the public: access specifier (see C++ core guidelines: C.81).
A less preferred, more Boost-like approach is private inheritance from estd::uncopyable, as it:
Clutters the class hierarchy
Creates inconsistency in class interface definitions when applying the Rule of Five
As I understand, the Macro UNCOPYABLE is included in estd's uncopyable.h for historical reasons?
Instead, the base class estd::uncopyable can be used instead consequently, since using C++ means is mostly better than preprocessor means.
The text was updated successfully, but these errors were encountered: