Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/none_t.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
0002 // Copyright (C) 2014, 2024 Andrzej Krzemienski.
0003 //
0004 // Use, modification, and distribution is subject to the Boost Software
0005 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // See http://www.boost.org/libs/optional for documentation.
0009 //
0010 // You are welcome to contact the author at:
0011 //  fernando_cacciola@hotmail.com
0012 //
0013 #ifndef BOOST_NONE_T_17SEP2003_HPP
0014 #define BOOST_NONE_T_17SEP2003_HPP
0015 
0016 #include <boost/config.hpp>
0017 #include <boost/config/pragma_message.hpp>
0018 
0019 #if defined (BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
0020 || defined(BOOST_NO_CXX11_LAMBDAS) || defined(BOOST_NO_CXX11_DECLTYPE_N3276)  \
0021 || defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) \
0022 || defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || defined(BOOST_NO_CXX11_STATIC_ASSERT)
0023 
0024 #error "Boost.Optional requires some C++11 features since version 1.87. If you have an older C++ version use Boost.Optional version 1.86 or earlier."
0025 
0026 #elif defined(BOOST_NO_CXX11_REF_QUALIFIERS) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DEFAULTED_MOVES)
0027 
0028 BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Optional 1.83 and will be removed in Boost.Optional 1.88.")
0029 
0030 #endif
0031 
0032 namespace boost {
0033 
0034 #ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
0035 
0036 namespace detail { struct none_helper{}; }
0037 typedef int detail::none_helper::*none_t ;
0038 
0039 #elif defined BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE
0040 
0041 class none_t {};
0042 
0043 #else
0044 
0045 struct none_t
0046 {
0047   struct init_tag{};
0048   explicit BOOST_CONSTEXPR none_t(init_tag){} // to disable default constructor
0049 };
0050 
0051 #endif // old implementation workarounds
0052 
0053 } // namespace boost
0054 
0055 #endif // header guard