diff --git a/include/boost/mp11_single.hpp b/include/boost/mp11_single.hpp index a27cc0e..d11c020 100644 --- a/include/boost/mp11_single.hpp +++ b/include/boost/mp11_single.hpp @@ -1100,8 +1100,8 @@ template using mp_map_find = typename detail::mp_map_find_impl } // namespace boost #endif // #ifndef BOOST_MP11_DETAIL_MP_MAP_FIND_HPP_INCLUDED -#ifndef BOOST_MP11_DETAIL_MP_FOR_INDEX_HPP_INCLUDED -#define BOOST_MP11_DETAIL_MP_FOR_INDEX_HPP_INCLUDED +#ifndef BOOST_MP11_DETAIL_MP_WITH_INDEX_HPP_INCLUDED +#define BOOST_MP11_DETAIL_MP_WITH_INDEX_HPP_INCLUDED // Copyright 2017 Peter Dimov. // @@ -1129,7 +1129,7 @@ namespace mp11 namespace detail { -template struct mp_for_index_impl_ +template struct mp_with_index_impl_ { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1153,15 +1153,15 @@ template struct mp_for_index_impl_ case 15: return std::forward(f)( mp_size_t() ); } - return mp_for_index_impl_::template call( i-16, std::forward(f) ); + return mp_with_index_impl_::template call( i-16, std::forward(f) ); } }; -template<> struct mp_for_index_impl_<0> +template<> struct mp_with_index_impl_<0> { }; -template<> struct mp_for_index_impl_<1> +template<> struct mp_with_index_impl_<1> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t /*i*/, F && f ) { @@ -1169,7 +1169,7 @@ template<> struct mp_for_index_impl_<1> } }; -template<> struct mp_for_index_impl_<2> +template<> struct mp_with_index_impl_<2> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1181,7 +1181,7 @@ template<> struct mp_for_index_impl_<2> } }; -template<> struct mp_for_index_impl_<3> +template<> struct mp_with_index_impl_<3> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1194,7 +1194,7 @@ template<> struct mp_for_index_impl_<3> } }; -template<> struct mp_for_index_impl_<4> +template<> struct mp_with_index_impl_<4> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1208,7 +1208,7 @@ template<> struct mp_for_index_impl_<4> } }; -template<> struct mp_for_index_impl_<5> +template<> struct mp_with_index_impl_<5> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1223,7 +1223,7 @@ template<> struct mp_for_index_impl_<5> } }; -template<> struct mp_for_index_impl_<6> +template<> struct mp_with_index_impl_<6> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1239,7 +1239,7 @@ template<> struct mp_for_index_impl_<6> } }; -template<> struct mp_for_index_impl_<7> +template<> struct mp_with_index_impl_<7> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1256,7 +1256,7 @@ template<> struct mp_for_index_impl_<7> } }; -template<> struct mp_for_index_impl_<8> +template<> struct mp_with_index_impl_<8> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1274,7 +1274,7 @@ template<> struct mp_for_index_impl_<8> } }; -template<> struct mp_for_index_impl_<9> +template<> struct mp_with_index_impl_<9> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1293,7 +1293,7 @@ template<> struct mp_for_index_impl_<9> } }; -template<> struct mp_for_index_impl_<10> +template<> struct mp_with_index_impl_<10> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1313,7 +1313,7 @@ template<> struct mp_for_index_impl_<10> } }; -template<> struct mp_for_index_impl_<11> +template<> struct mp_with_index_impl_<11> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1334,7 +1334,7 @@ template<> struct mp_for_index_impl_<11> } }; -template<> struct mp_for_index_impl_<12> +template<> struct mp_with_index_impl_<12> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1356,7 +1356,7 @@ template<> struct mp_for_index_impl_<12> } }; -template<> struct mp_for_index_impl_<13> +template<> struct mp_with_index_impl_<13> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1379,7 +1379,7 @@ template<> struct mp_for_index_impl_<13> } }; -template<> struct mp_for_index_impl_<14> +template<> struct mp_with_index_impl_<14> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1403,7 +1403,7 @@ template<> struct mp_for_index_impl_<14> } }; -template<> struct mp_for_index_impl_<15> +template<> struct mp_with_index_impl_<15> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1428,7 +1428,7 @@ template<> struct mp_for_index_impl_<15> } }; -template<> struct mp_for_index_impl_<16> +template<> struct mp_with_index_impl_<16> { template static BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) call( std::size_t i, F && f ) { @@ -1456,15 +1456,15 @@ template<> struct mp_for_index_impl_<16> } // namespace detail -template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ) +template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { assert( i < N ); - return detail::mp_for_index_impl_::template call<0>( i, std::forward(f) ); + return detail::mp_with_index_impl_::template call<0>( i, std::forward(f) ); } -template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_for_index( std::size_t i, F && f ) +template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval()(std::declval>())) mp_with_index( std::size_t i, F && f ) { - return mp_for_index( i, std::forward(f) ); + return mp_with_index( i, std::forward(f) ); } #undef BOOST_MP11_CONSTEXPR14 @@ -1472,7 +1472,7 @@ template inline BOOST_MP11_CONSTEXPR14 decltype(std::declval