Adding any noncopyable member to a class would prevent the automatic generation of copy construction and assignment operator. Why does boost require inheritance to use noncopyable?
I think I am not alone in my stylistic preference for
class MyUtility : public MyBase
{
noncopyable guard;
...
};
as opposed to
class MyUtility : public MyBase , private noncopyable
{
...
};
Dave Abrahams is a smart guy, so he probably considered this possibility. What am I missing? What does inheritence accomplish?