Brian Silverman | fad8f55 | 2018-08-04 23:36:19 -0700 | [diff] [blame^] | 1 | ////////////////////////////////////////////////////////////////////////////// |
| 2 | // |
| 3 | // (C) Copyright Ion Gaztanaga 2005-2013. |
| 4 | // |
| 5 | // Distributed under the Boost Software License, Version 1.0. |
| 6 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
| 8 | // |
| 9 | // See http://www.boost.org/libs/container for documentation. |
| 10 | // |
| 11 | ////////////////////////////////////////////////////////////////////////////// |
| 12 | |
| 13 | #ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP |
| 14 | #define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP |
| 15 | |
| 16 | #ifndef BOOST_CONFIG_HPP |
| 17 | # include <boost/config.hpp> |
| 18 | #endif |
| 19 | |
| 20 | #if defined(BOOST_HAS_PRAGMA_ONCE) |
| 21 | # pragma once |
| 22 | #endif |
| 23 | |
| 24 | #include <boost/container/detail/config_begin.hpp> |
| 25 | #include <boost/container/detail/workaround.hpp> |
| 26 | #include <boost/move/detail/type_traits.hpp> |
| 27 | #include <boost/intrusive/detail/mpl.hpp> |
| 28 | |
| 29 | #include <cstddef> |
| 30 | |
| 31 | namespace boost { |
| 32 | namespace container { |
| 33 | namespace dtl { |
| 34 | |
| 35 | using boost::move_detail::integral_constant; |
| 36 | using boost::move_detail::true_type; |
| 37 | using boost::move_detail::false_type; |
| 38 | using boost::move_detail::enable_if_c; |
| 39 | using boost::move_detail::enable_if; |
| 40 | using boost::move_detail::enable_if_convertible; |
| 41 | using boost::move_detail::disable_if_c; |
| 42 | using boost::move_detail::disable_if; |
| 43 | using boost::move_detail::disable_if_convertible; |
| 44 | using boost::move_detail::is_convertible; |
| 45 | using boost::move_detail::if_c; |
| 46 | using boost::move_detail::if_; |
| 47 | using boost::move_detail::identity; |
| 48 | using boost::move_detail::bool_; |
| 49 | using boost::move_detail::true_; |
| 50 | using boost::move_detail::false_; |
| 51 | using boost::move_detail::yes_type; |
| 52 | using boost::move_detail::no_type; |
| 53 | using boost::move_detail::bool_; |
| 54 | using boost::move_detail::true_; |
| 55 | using boost::move_detail::false_; |
| 56 | using boost::move_detail::unvoid_ref; |
| 57 | using boost::move_detail::and_; |
| 58 | using boost::move_detail::or_; |
| 59 | using boost::move_detail::not_; |
| 60 | using boost::move_detail::enable_if_and; |
| 61 | using boost::move_detail::disable_if_and; |
| 62 | using boost::move_detail::enable_if_or; |
| 63 | using boost::move_detail::disable_if_or; |
| 64 | |
| 65 | template <class FirstType> |
| 66 | struct select1st |
| 67 | { |
| 68 | typedef FirstType type; |
| 69 | |
| 70 | template<class T> |
| 71 | const type& operator()(const T& x) const |
| 72 | { return x.first; } |
| 73 | |
| 74 | template<class T> |
| 75 | type& operator()(T& x) |
| 76 | { return const_cast<type&>(x.first); } |
| 77 | }; |
| 78 | |
| 79 | template <class T, class=void> |
| 80 | struct is_transparent |
| 81 | { |
| 82 | static const bool value = false; |
| 83 | }; |
| 84 | |
| 85 | template <class T> |
| 86 | struct is_transparent<T, typename T::is_transparent> |
| 87 | { |
| 88 | static const bool value = true; |
| 89 | }; |
| 90 | |
| 91 | template <typename C, typename K, typename R> |
| 92 | struct enable_if_transparent |
| 93 | : boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R> |
| 94 | {}; |
| 95 | |
| 96 | |
| 97 | } //namespace dtl { |
| 98 | } //namespace container { |
| 99 | } //namespace boost { |
| 100 | |
| 101 | #include <boost/container/detail/config_end.hpp> |
| 102 | |
| 103 | #endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP |
| 104 | |