Derive noncopyable from a base_token class to allow it to be detected by Type Traits without an #include

This commit is contained in:
Peter Dimov
2018-08-25 01:47:47 +03:00
parent f504872d89
commit f3782a946f

View File

@ -20,7 +20,14 @@ namespace boost {
namespace noncopyable_ // protection from unintended ADL namespace noncopyable_ // protection from unintended ADL
{ {
class noncopyable #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
struct base_token {};
#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
class noncopyable: base_token
{ {
protected: protected:
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)