From be9f5a4b9bd3997b7ad5655c5f7dba02f19a5125 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 24 Mar 2018 09:50:37 +0300 Subject: [PATCH] Droped dependency on MPL --- .../type_index/detail/compile_time_type_info.hpp | 10 +++++----- include/boost/type_index/stl_type_index.hpp | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/boost/type_index/detail/compile_time_type_info.hpp b/include/boost/type_index/detail/compile_time_type_info.hpp index 4eb2017..5b78012 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -1,5 +1,5 @@ // -// Copyright (c) Antony Polukhin, 2012-2016. +// Copyright (c) Antony Polukhin, 2012-2018. // // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -15,7 +15,7 @@ #include #include -#include +#include #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once @@ -98,7 +98,7 @@ namespace boost { namespace typeindex { namespace detail { } template - BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT { + BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::false_type) BOOST_NOEXCEPT { return begin; } @@ -140,7 +140,7 @@ namespace boost { namespace typeindex { namespace detail { } template - BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT { + BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::true_type) BOOST_NOEXCEPT { const char* const it = constexpr_search( begin, begin + ArrayLength, ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1 @@ -153,7 +153,7 @@ namespace boost { namespace typeindex { namespace detail { assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>(); return skip_begining_runtime( begin + ctti_skip_size_at_begin, - boost::mpl::bool_() + boost::integral_constant() ); } diff --git a/include/boost/type_index/stl_type_index.hpp b/include/boost/type_index/stl_type_index.hpp index 3a9834d..0f7dae8 100644 --- a/include/boost/type_index/stl_type_index.hpp +++ b/include/boost/type_index/stl_type_index.hpp @@ -32,13 +32,12 @@ #include #include #include +#include #include #include #include #include #include -#include -#include #include @@ -46,7 +45,7 @@ || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) # include # include -# include +# include #endif #ifdef BOOST_HAS_PRAGMA_ONCE @@ -232,10 +231,10 @@ inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT { // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral' // in typeid() expressions. Full template specialization for 'integral' fixes that issue: - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< - boost::is_signed, + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_signed::value, boost::make_signed, - boost::mpl::identity + boost::type_identity >::type no_cvr_prefinal_lazy_t; typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t; @@ -252,8 +251,8 @@ namespace detail { template inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< - boost::mpl::or_, boost::is_const, boost::is_volatile >, + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_reference::value || boost::is_const::value || boost::is_volatile::value, detail::cvr_saver, T >::type type;