1 #ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
2 #define BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
5 // Copyright 2018 Peter Dimov
7 // Distributed under the Boost Software License, Version 1.0.
8 // See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt
11 // is_noncopyable<T> returns whether T is derived from boost::noncopyable
14 #include <boost/type_traits/is_base_and_derived.hpp>
19 #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
20 #define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
22 // boost::noncopyable derives from noncopyable_::base_token to enable us
23 // to recognize it. The definition is macro-guarded so that we can replicate
24 // it here without including boost/core/noncopyable.hpp, which is in Core.
26 namespace noncopyable_
31 #endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
33 template<class T> struct is_noncopyable: is_base_and_derived<noncopyable_::base_token, T>
39 #endif // #ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED