|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-09-03 22:41:04
> I'll take this opportunity to ask this question:
> Why isn't noncopyable a template class?
>
> That is:
>
> template<class T>
> class noncopyable
> {
> protected:
> noncopyable(){}
> ~noncopyable(){}
> private: // emphasize the following members are private
> noncopyable( const noncopyable& );
> const noncopyable& operator=( const noncopyable& );
> }; // noncopyable
>
>
> Used as:
>
> struct Some : boost::noncopyable< Some>
> {
> ...
> };
>
> just wonder...
Because it doesn't need to be a template class.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk