ADL protection

[SVN r24564]
This commit is contained in:
Dave Abrahams 2004-08-18 17:01:11 +00:00
parent 4229488989
commit f0b64b6229

View File

@ -16,15 +16,20 @@ namespace boost {
// Contributed by Dave Abrahams // Contributed by Dave Abrahams
class noncopyable namespace noncopyable_ // protection from unintended ADL
{ {
protected: class noncopyable
noncopyable() {} {
~noncopyable() {} protected:
private: // emphasize the following members are private noncopyable() {}
noncopyable( const noncopyable& ); ~noncopyable() {}
const noncopyable& operator=( const noncopyable& ); private: // emphasize the following members are private
}; noncopyable( const noncopyable& );
const noncopyable& operator=( const noncopyable& );
};
}
typedef noncopyable_::noncopyable noncopyable;
} // namespace boost } // namespace boost