drop dependency on boost.detail

This commit is contained in:
Andrzej Krzemienski
2024-01-03 21:41:26 +01:00
parent a1dbd3b67d
commit 01e80d2b87
10 changed files with 34 additions and 257 deletions

View File

@ -13,10 +13,10 @@
#define BOOST_OPTIONAL_DETAIL_EXPERIMENTAL_TRAITS_04NOV2017_HPP
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config/workaround.hpp>
#include <boost/predef.h>
#include <boost/type_traits.hpp>
// The condition to use POD implementation
#ifdef BOOST_OPTIONAL_CONFIG_NO_POD_SPEC
@ -50,7 +50,7 @@
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
# endif
# endif
#endif
#endif
#ifndef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
@ -59,10 +59,10 @@
# include <type_traits>
# define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) std::is_trivially_default_constructible<T>::value
#endif
namespace boost { namespace optional_detail {
#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
template <typename T>
struct is_type_trivially_copyable
@ -83,7 +83,7 @@ struct is_type_trivially_copyable
#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
template <typename T>
struct optional_uses_direct_storage_for_
: boost::conditional< (is_type_trivially_copyable<T>::value && BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T)) ||

View File

@ -14,7 +14,7 @@
#define BOOST_OPTIONAL_DETAIL_OPTIONAL_CONFIG_AJK_28JAN2015_HPP
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config/workaround.hpp>
#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES)
# define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
@ -55,7 +55,7 @@
#if (defined(_MSC_VER) && _MSC_VER <= 1800)
// on MSVC 2013 and earlier an unwanted temporary is created when you assign from
// a const lvalue of integral type. Thus we bind not to the original address but
// to a temporary.
// to a temporary.
# define BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
#endif

View File

@ -83,9 +83,6 @@ struct optional_value_type< ::boost::optional<T> >
}} // namespace boost::optional_detail
#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
#include <boost/optional/detail/old_optional_implementation.hpp>
#else
namespace boost {
namespace optional_ns {
@ -1513,11 +1510,6 @@ class optional
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
} ;
} // namespace boost
#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
namespace boost {
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class T>