File indexing completed on 2025-01-18 09:30:30
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_CORE_NONCOPYABLE_HPP
0010 #define BOOST_CORE_NONCOPYABLE_HPP
0011
0012 #include <boost/config.hpp>
0013
0014 namespace boost {
0015
0016
0017
0018
0019
0020
0021 namespace noncopyable_
0022 {
0023 #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
0024 #define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 struct base_token {};
0035
0036 #endif
0037
0038 class noncopyable: base_token
0039 {
0040 protected:
0041 #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
0042 BOOST_CONSTEXPR noncopyable() = default;
0043 ~noncopyable() = default;
0044 #else
0045 noncopyable() {}
0046 ~noncopyable() {}
0047 #endif
0048 #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
0049 noncopyable( const noncopyable& ) = delete;
0050 noncopyable& operator=( const noncopyable& ) = delete;
0051 #else
0052 private:
0053 noncopyable( const noncopyable& );
0054 noncopyable& operator=( const noncopyable& );
0055 #endif
0056 };
0057 }
0058
0059 typedef noncopyable_::noncopyable noncopyable;
0060
0061 }
0062
0063 #endif