File indexing completed on 2025-01-18 09:29:44
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP
0009 #define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP
0010
0011 #undef BOOST_CLBL_TRTS_IX_SEQ
0012 #define BOOST_CLBL_TRTS_IX_SEQ(...) \
0013 ::boost::callable_traits::detail::index_sequence<__VA_ARGS__>
0014
0015 #undef BOOST_CLBL_TRTS_MAKE_IX_SEQ
0016 #define BOOST_CLBL_TRTS_MAKE_IX_SEQ(...) \
0017 ::boost::callable_traits::detail::make_index_sequence<__VA_ARGS__>
0018
0019 namespace boost { namespace callable_traits { namespace detail {
0020
0021 template<std::size_t...>
0022 struct index_sequence { using type = index_sequence; };
0023
0024 template<typename, typename>
0025 struct concat;
0026
0027 template<std::size_t... I1, std::size_t... I2>
0028 struct concat<index_sequence<I1...>, index_sequence<I2...>>
0029 : index_sequence<I1..., (sizeof...(I1)+I2)...> {};
0030
0031 template<std::size_t N>
0032 struct make_index_sequence_t;
0033
0034 template<std::size_t N>
0035 struct make_index_sequence_t : concat<
0036 typename make_index_sequence_t<N/2>::type,
0037 typename make_index_sequence_t<N - N/2>::type >::type {};
0038
0039 template<>
0040 struct make_index_sequence_t<0> : index_sequence<> {};
0041
0042 template<>
0043 struct make_index_sequence_t<1> : index_sequence<0> {};
0044
0045 template<std::size_t... I>
0046 using make_index_sequence = typename make_index_sequence_t<I...>::type;
0047
0048 }}}
0049
0050 #endif