What's your practice on using noncopyable mixins vs. explicit memer deletion?
I can make a a class Foo move-only by
class Foo
{
public:
Foo(const Foo &) = delete;
Foo & operator=(const Foo &) = delete;
};
that's not too bad and almost idiomatic, but the class name is repeated 5 times, and there are minor details (& vs. const &) to get wrong in a hurry.
(yes, technically, the operator= return type doesn't matter and could be void, but that's likely to trip up readers, reviewers and style checks)
Even before move semantics and explicitely deleted special functions, there were noncopyable mixins like boost::noncopyable to make the intent explicit and brief.
What's your take on this? Do you regularly mark classes as non-copyable explicitely, and which way to you prefer?