
Ulrich Eckhardt wrote:
I added a comment inline which I hope explains the rationale for this class, because it is far from obvious IMHO. If the reasons there are wrong, please correct me. Other than that, I'd suggest naming it noncopyable_base<T>.
This should IMHO go to the documentation, maybe a small comment in the code could be added as well. My implementation wasn't meant to go the CVS, it was just a complete example of what the technical part of the change should be. Of course the real change would also include documentation changes and maybe even a testcase... For the name, noncopyable_base is too much typing for my taste, YMMV. Ideally, it would have been noncopyable<T> from the very beginning, but it's too late for that, so I think adding a simple _ is the least intrusive change. Anyway, it's a valid idea to use _base, let's see what others think.
namespace noncopyable_impl // prevent unintended ADL { template< typename > class noncopyable_ { // omitted ... }; typedef noncopyable_<void> noncopyable; }
using namespace noncopyable_impl;
Why this? I guess it is intended to prevent ADL, right? Can you point me to a rationale for this?
For example: <http://lists.boost.org/boost-users/2006/06/20110.php> Regards, Daniel