Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:45:24

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2005-2013.
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // See http://www.boost.org/libs/container for documentation.
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 /*Dummy*/, 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 // void_t (void_t for C++11)
0109 template<typename...> using variadic_void_t = void;
0110 
0111 // Trait to detect Allocator-like types.
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 }  //namespace dtl {
0138 }  //namespace container {
0139 }  //namespace boost {
0140 
0141 #include <boost/container/detail/config_end.hpp>
0142 
0143 #endif   //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
0144