mirror of
https://github.com/boostorg/core.git
synced 2025-07-30 12:57:26 +02:00
Derive noncopyable from a base_token class to allow it to be detected by Type Traits without an #include
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user