Reputation: 20790
Is there any class similar to http://www.boost.org/doc/libs/1_53_0/boost/noncopyable.hpp introduced by C++ 11? I can't use = delete
feature as my compiler doesn't support it. I would prefer to use standard library features if possible instead of boost or implementing my own.
Upvotes: 5
Views: 5816
Reputation: 81
i don't think noncopyable is useless. The '= delete' need to be used twice (copy ctor and assignment operator) and that would be too much typing. if your code already has dependency on boost - the use of boost::noncopyable is preferred.
Upvotes: 4
Reputation: 40633
No, there is no similar standard class. C++11 introduced = delete
for this purpose, so additionally introducing a class would have been needlessly redundant and useless.
Upvotes: 12