diff --git a/include/boost/pfr/detail/core14_classic.hpp b/include/boost/pfr/detail/core14_classic.hpp index f74a0be..e4d5103 100644 --- a/include/boost/pfr/detail/core14_classic.hpp +++ b/include/boost/pfr/detail/core14_classic.hpp @@ -366,7 +366,7 @@ template constexpr size_array fields_count_and_type_ids_with_zeros() noexcept { size_array types{}; constexpr std::size_t N = detail::fields_count(); - detail::flat_type_to_array_of_type_ids(types.data, make_index_sequence()); + detail::flat_type_to_array_of_type_ids(types.data, detail::make_index_sequence()); return types; } @@ -417,7 +417,7 @@ constexpr auto prepare_subtuples(size_t_, siz template constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept { static_assert(SubtupleLength > 2, "====================> Boost.PFR: Internal error while representing nested field as tuple"); - constexpr auto seq = make_index_sequence{}; + constexpr auto seq = detail::make_index_sequence{}; return detail::as_flat_tuple_impl( detail::increment_index_sequence(seq) ); } @@ -496,7 +496,7 @@ constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept { return detail::as_flat_tuple_impl_drop_helpers( std::index_sequence{}, - make_index_sequence< 1 + count_of_I - count_skips_in_array(First, First + count_of_I, a) >{} + detail::make_index_sequence< 1 + count_of_I - count_skips_in_array(First, First + count_of_I, a) >{} ); } @@ -507,7 +507,7 @@ constexpr auto internal_tuple_with_same_alignment() noexcept { static_assert(std::is_pod::value, "====================> Boost.PFR: Type can not be used is flat_ functions, because it's not POD"); static_assert(!std::is_reference::value, "====================> Boost.PFR: Not applyable"); constexpr auto res = detail::as_flat_tuple_impl( - make_index_sequence< decltype(detail::flat_array_of_type_ids())::size() >() + detail::make_index_sequence< decltype(detail::flat_array_of_type_ids())::size() >() ); return res; @@ -566,7 +566,7 @@ auto tie_as_tuple(T& val) noexcept { "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." ); static_assert( - boost::pfr::detail::is_flat_refelectable( make_index_sequence()>{} ), + boost::pfr::detail::is_flat_refelectable( detail::make_index_sequence()>{} ), "====================> Boost.PFR: Not possible in C++14 to represent that type without loosing information. Use boost::pfr::flat_ version, or change type definition, or enable C++17" ); return boost::pfr::detail::tie_as_flat_tuple(val); diff --git a/include/boost/pfr/detail/core14_loophole.hpp b/include/boost/pfr/detail/core14_loophole.hpp index d1f45a2..4cd9fc8 100644 --- a/include/boost/pfr/detail/core14_loophole.hpp +++ b/include/boost/pfr/detail/core14_loophole.hpp @@ -104,7 +104,7 @@ struct loophole_type_list< T, std::index_sequence > template auto tie_as_tuple_loophole_impl(T& lvalue) noexcept { using type = std::remove_cv_t>; - using indexes = make_index_sequence()>; + using indexes = detail::make_index_sequence()>; using tuple_type = typename loophole_type_list::type; return boost::pfr::detail::make_flat_tuple_of_references( @@ -169,7 +169,7 @@ auto tie_as_tuple_recursively_impl(T& tup, std::index_sequence ) noexcept template auto tie_as_tuple_recursively(rvalue_t tup) noexcept { - using indexes = make_index_sequence; + using indexes = detail::make_index_sequence; return boost::pfr::detail::tie_as_tuple_recursively_impl(tup, indexes{}); } diff --git a/include/boost/pfr/detail/fields_count.hpp b/include/boost/pfr/detail/fields_count.hpp index 0bca94a..dd3f8a6 100644 --- a/include/boost/pfr/detail/fields_count.hpp +++ b/include/boost/pfr/detail/fields_count.hpp @@ -75,7 +75,7 @@ struct is_aggregate_initializable_n { std::is_empty::value || std::is_array::value || std::is_fundamental::value - || is_not_constructible_n(make_index_sequence{}) + || is_not_constructible_n(detail::make_index_sequence{}) ; }; @@ -88,7 +88,7 @@ template ) noexcept -> typename std::add_pointer::type; -template (make_index_sequence()) ) > +template (detail::make_index_sequence()) ) > using enable_if_constructible_helper_t = std::size_t; ///////////////////// Non greedy fields count search. Templates instantiation depth is log(sizeof(T)), templates instantiation count is log(sizeof(T)). diff --git a/include/boost/pfr/detail/flat_tie_from_structure_tuple.hpp b/include/boost/pfr/detail/flat_tie_from_structure_tuple.hpp index 41afdfd..84ef52b 100644 --- a/include/boost/pfr/detail/flat_tie_from_structure_tuple.hpp +++ b/include/boost/pfr/detail/flat_tie_from_structure_tuple.hpp @@ -29,7 +29,7 @@ struct flat_tie_from_structure_tuple : std::tuple { base::operator=( detail::make_stdtiedtuple_from_tietuple( detail::tie_as_flat_tuple(t), - make_index_sequence>())); + detail::make_index_sequence>())); return *this; } }; diff --git a/include/boost/pfr/detail/make_flat_tuple_of_references.hpp b/include/boost/pfr/detail/make_flat_tuple_of_references.hpp index 92e751c..9b2be9a 100644 --- a/include/boost/pfr/detail/make_flat_tuple_of_references.hpp +++ b/include/boost/pfr/detail/make_flat_tuple_of_references.hpp @@ -64,8 +64,8 @@ constexpr auto my_tuple_cat_impl(const Tuple1& t1, std::index_sequence, c template constexpr auto my_tuple_cat(const Tuple1& t1, const Tuple2& t2) noexcept { return detail::my_tuple_cat_impl( - t1, make_index_sequence< Tuple1::size_v >{}, - t2, make_index_sequence< Tuple2::size_v >{} + t1, detail::make_index_sequence< Tuple1::size_v >{}, + t2, detail::make_index_sequence< Tuple2::size_v >{} ); } diff --git a/include/boost/pfr/detail/make_integer_sequence.hpp b/include/boost/pfr/detail/make_integer_sequence.hpp index 64fe800..7bf534a 100644 --- a/include/boost/pfr/detail/make_integer_sequence.hpp +++ b/include/boost/pfr/detail/make_integer_sequence.hpp @@ -16,13 +16,9 @@ namespace boost { namespace pfr { namespace detail { #if BOOST_PFR_USE_STD_INTEGRAL_SEQUENCE == 0 -template +template struct join_sequences; -template -struct join_sequences - : join_sequences< typename join_sequences::type, V...> {}; - template struct join_sequences, std::integer_sequence> { using type = std::integer_sequence; @@ -40,7 +36,6 @@ struct build_sequence_impl { template struct build_sequence_impl { - static constexpr T size = 1; using type = std::integer_sequence; }; diff --git a/include/boost/pfr/detail/sequence_tuple.hpp b/include/boost/pfr/detail/sequence_tuple.hpp index 4d60a06..3edfee7 100644 --- a/include/boost/pfr/detail/sequence_tuple.hpp +++ b/include/boost/pfr/detail/sequence_tuple.hpp @@ -76,11 +76,11 @@ constexpr T&& get_impl(base_from_member&& t) noexcept { template struct tuple: tuple_base< - index_sequence_for, + detail::index_sequence_for, Values...> { using tuple_base< - index_sequence_for, + detail::index_sequence_for, Values... >::tuple_base; }; diff --git a/include/boost/pfr/detail/tie_from_structure_tuple.hpp b/include/boost/pfr/detail/tie_from_structure_tuple.hpp index 32e4435..6db672f 100644 --- a/include/boost/pfr/detail/tie_from_structure_tuple.hpp +++ b/include/boost/pfr/detail/tie_from_structure_tuple.hpp @@ -31,7 +31,7 @@ struct tie_from_structure_tuple : std::tuple { base::operator=( detail::make_stdtiedtuple_from_tietuple( detail::tie_as_tuple(t), - make_index_sequence>())); + detail::make_index_sequence>())); return *this; } }; diff --git a/test/flat/core.cpp b/test/flat/core.cpp index a6cb4a1..b078d75 100644 --- a/test/flat/core.cpp +++ b/test/flat/core.cpp @@ -412,7 +412,7 @@ void test_and_debug_internals(std::index_sequence) { static_assert( std::is_same< decltype(boost::pfr::detail::as_flat_tuple_impl( - std::make_index_sequence< decltype(boost::pfr::detail::flat_array_of_type_ids())::size() >() + detail::make_index_sequence< decltype(boost::pfr::detail::flat_array_of_type_ids())::size() >() )), boost::pfr::detail::sequence_tuple::tuple, char, char> >::value, @@ -420,7 +420,7 @@ void test_and_debug_internals(std::index_sequence) { ); constexpr auto res = as_flat_tuple_impl( - std::make_index_sequence< decltype(flat_array_of_type_ids())::size() >() + detail::make_index_sequence< decltype(flat_array_of_type_ids())::size() >() ); auto afoo = flat_array_of_type_ids(); std::cerr << "\n\n"; @@ -690,7 +690,7 @@ int main() { static_assert(tuple_size::value == 4, ""); static_assert(flat_tuple_size::value == 4, ""); - test_and_debug_internals(std::make_index_sequence<6>{}); + test_and_debug_internals(detail::make_index_sequence<6>{}); test_alignment_with_nested_structure(); another_test_with_unusual_alignment();