123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef BOOST_CORE_NONCOPYABLE_HPP
- #define BOOST_CORE_NONCOPYABLE_HPP
- #include <boost/config.hpp>
- namespace boost {
- namespace noncopyable_
- {
- #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
- #define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
- struct base_token {};
- #endif
- class noncopyable: base_token
- {
- protected:
- #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
- BOOST_CONSTEXPR noncopyable() = default;
- ~noncopyable() = default;
- #else
- noncopyable() {}
- ~noncopyable() {}
- #endif
- #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
- noncopyable( const noncopyable& ) = delete;
- noncopyable& operator=( const noncopyable& ) = delete;
- #else
- private:
- noncopyable( const noncopyable& );
- noncopyable& operator=( const noncopyable& );
- #endif
- };
- }
- typedef noncopyable_::noncopyable noncopyable;
- }
- #endif
|