File indexing completed on 2025-12-15 09:45:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
0014 #define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
0015
0016 #ifndef BOOST_CONFIG_HPP
0017 # include <boost/config.hpp>
0018 #endif
0019
0020 #if defined(BOOST_HAS_PRAGMA_ONCE)
0021 # pragma once
0022 #endif
0023
0024 #include <boost/container/detail/config_begin.hpp>
0025 #include <boost/container/detail/workaround.hpp>
0026 #include <boost/move/detail/type_traits.hpp>
0027 #include <boost/intrusive/detail/mpl.hpp>
0028
0029 #include <cstddef>
0030
0031 namespace boost {
0032 namespace container {
0033 namespace dtl {
0034
0035 using boost::move_detail::integral_constant;
0036 using boost::move_detail::true_type;
0037 using boost::move_detail::false_type;
0038 using boost::move_detail::enable_if_c;
0039 using boost::move_detail::enable_if;
0040 using boost::move_detail::enable_if_convertible;
0041 using boost::move_detail::disable_if_c;
0042 using boost::move_detail::disable_if;
0043 using boost::move_detail::disable_if_convertible;
0044 using boost::move_detail::is_convertible;
0045 using boost::move_detail::if_c;
0046 using boost::move_detail::if_;
0047 using boost::move_detail::identity;
0048 using boost::move_detail::bool_;
0049 using boost::move_detail::true_;
0050 using boost::move_detail::false_;
0051 using boost::move_detail::yes_type;
0052 using boost::move_detail::no_type;
0053 using boost::move_detail::bool_;
0054 using boost::move_detail::true_;
0055 using boost::move_detail::false_;
0056 using boost::move_detail::unvoid_ref;
0057 using boost::move_detail::and_;
0058 using boost::move_detail::or_;
0059 using boost::move_detail::not_;
0060 using boost::move_detail::enable_if_and;
0061 using boost::move_detail::disable_if_and;
0062 using boost::move_detail::enable_if_or;
0063 using boost::move_detail::disable_if_or;
0064 using boost::move_detail::remove_const;
0065
0066 template <class FirstType>
0067 struct select1st
0068 {
0069 typedef FirstType type;
0070
0071 template<class T>
0072 BOOST_CONTAINER_FORCEINLINE const type& operator()(const T& x) const
0073 { return x.first; }
0074
0075 template<class T>
0076 BOOST_CONTAINER_FORCEINLINE type& operator()(T& x)
0077 { return const_cast<type&>(x.first); }
0078 };
0079
0080
0081 template<typename T>
0082 struct void_t { typedef void type; };
0083
0084 template <class T, class=void>
0085 struct is_transparent_base
0086 {
0087 BOOST_STATIC_CONSTEXPR bool value = false;
0088 };
0089
0090 template <class T>
0091 struct is_transparent_base<T, typename void_t<typename T::is_transparent>::type>
0092 {
0093 BOOST_STATIC_CONSTEXPR bool value = true;
0094 };
0095
0096 template <class T>
0097 struct is_transparent
0098 : is_transparent_base<T>
0099 {};
0100
0101 template <typename C, class , typename R>
0102 struct enable_if_transparent
0103 : boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R>
0104 {};
0105
0106 #ifndef BOOST_CONTAINER_NO_CXX17_CTAD
0107
0108
0109 template<typename...> using variadic_void_t = void;
0110
0111
0112 template<typename Allocator, typename = void>
0113 struct is_allocator
0114 {
0115 BOOST_STATIC_CONSTEXPR bool value = false;
0116 };
0117
0118 template <typename T>
0119 T&& ctad_declval();
0120
0121 template<typename Allocator>
0122 struct is_allocator < Allocator,
0123 variadic_void_t< typename Allocator::value_type
0124 , decltype(ctad_declval<Allocator&>().allocate(size_t{})) >>
0125 {
0126 BOOST_STATIC_CONSTEXPR bool value = true;
0127 };
0128
0129 template<class T>
0130 using require_allocator_t = typename enable_if_c<is_allocator<T>::value, T>::type;
0131
0132 template<class T>
0133 using require_nonallocator_t = typename enable_if_c<!is_allocator<T>::value, T>::type;
0134
0135 #endif
0136
0137 }
0138 }
0139 }
0140
0141 #include <boost/container/detail/config_end.hpp>
0142
0143 #endif
0144