From 049d4592c2a8ad347a280c0c6e74be64c38dc08f Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sun, 31 Mar 2013 15:14:10 +0900 Subject: [PATCH] fix index_range implementation --- sprout/algorithm/fixed/clamp_range_copy.hpp | 3 ++- sprout/algorithm/fixed/copy.hpp | 3 ++- sprout/algorithm/fixed/copy_backward.hpp | 3 ++- sprout/algorithm/fixed/fill.hpp | 2 +- sprout/algorithm/fixed/fill_n.hpp | 3 ++- sprout/algorithm/fixed/replace_copy.hpp | 3 ++- sprout/algorithm/fixed/replace_copy_if.hpp | 3 ++- sprout/algorithm/fixed/reverse_copy.hpp | 3 ++- sprout/algorithm/fixed/rotate_copy.hpp | 3 ++- sprout/algorithm/fixed/shuffle.hpp | 3 ++- sprout/algorithm/fixed/shuffle_result.hpp | 3 ++- sprout/algorithm/fixed/swap_element_copy.hpp | 3 ++- sprout/algorithm/fixed/transform.hpp | 5 +++-- sprout/algorithm/string/join.hpp | 5 +++-- sprout/array/array.hpp | 2 +- sprout/bitset/bitset.hpp | 8 ++++---- sprout/breed/detail/deduce_domain.hpp | 2 +- sprout/breed/generate.hpp | 4 ++-- sprout/breed/transform/pass_through.hpp | 4 ++-- sprout/container/indexes.hpp | 4 ++-- sprout/darkroom/lights/light_list.hpp | 2 +- sprout/darkroom/pixels/generate.hpp | 13 +++---------- sprout/functional/bind/bind.hpp | 6 +++--- sprout/io.hpp | 4 ++-- sprout/numeric/dft/fixed/amplitude_spectrum.hpp | 3 ++- sprout/numeric/dft/fixed/dft.hpp | 3 ++- sprout/numeric/dft/fixed/idft.hpp | 3 ++- sprout/numeric/dft/fixed/phase_spectrum.hpp | 3 ++- sprout/numeric/fft/fixed/bitrev_table.hpp | 3 ++- sprout/numeric/fixed/iota.hpp | 3 ++- sprout/operation/fixed/append.hpp | 11 +++-------- sprout/operation/fixed/append_back.hpp | 6 ++---- sprout/operation/fixed/append_front.hpp | 6 ++---- sprout/operation/fixed/erase.hpp | 11 +++-------- sprout/operation/fixed/erase_n.hpp | 11 +++-------- sprout/operation/fixed/insert.hpp | 11 +++-------- sprout/operation/fixed/insert_n.hpp | 11 +++-------- sprout/operation/fixed/pop_back.hpp | 6 ++---- sprout/operation/fixed/pop_back_n.hpp | 6 ++---- sprout/operation/fixed/pop_front.hpp | 6 ++---- sprout/operation/fixed/pop_front_n.hpp | 6 ++---- sprout/operation/fixed/push_back.hpp | 6 ++---- sprout/operation/fixed/push_back_n.hpp | 6 ++---- sprout/operation/fixed/push_front.hpp | 6 ++---- sprout/operation/fixed/push_front_n.hpp | 6 ++---- sprout/operation/fixed/realign.hpp | 11 +++-------- sprout/operation/fixed/realign_to.hpp | 11 +++-------- sprout/operation/fixed/resize.hpp | 11 +++-------- sprout/operation/fixed/resize_backward.hpp | 11 +++-------- sprout/operation/fixed/set.hpp | 11 +++-------- sprout/range/adaptor/piped.hpp | 4 ++-- sprout/string/concat.hpp | 10 +++++----- sprout/string/float_to_string.hpp | 4 ++-- sprout/string/int_to_string.hpp | 2 +- sprout/string/shrink.hpp | 2 +- sprout/string/string.hpp | 10 +++++----- sprout/sub_array/sub_array.hpp | 8 ++++---- sprout/tuple/algorithm/copy.hpp | 5 +++-- sprout/tuple/fused.hpp | 5 +++-- sprout/tuple/indexes.hpp | 2 +- sprout/tuple/operation/append_back.hpp | 5 +++-- sprout/tuple/operation/append_front.hpp | 5 +++-- sprout/tuple/operation/pop_back.hpp | 2 +- sprout/tuple/operation/push_back.hpp | 3 ++- sprout/tuple/operation/push_front.hpp | 3 ++- sprout/tuple/traits.hpp | 3 ++- sprout/tuple/tuple/hash.hpp | 2 +- sprout/tuple/tuple/make_tuple.hpp | 11 +++++------ sprout/tuple/tuple/tuple_decl.hpp | 2 +- sprout/type/operation/append_back.hpp | 5 +++-- sprout/type/operation/append_front.hpp | 5 +++-- sprout/type/operation/pop_back.hpp | 2 +- sprout/type/operation/push_back.hpp | 3 ++- sprout/type/operation/push_front.hpp | 3 ++- sprout/type/string/to_string.hpp | 2 +- sprout/type/string/to_string_constant.hpp | 2 +- sprout/utility/pair/pair.hpp | 4 ++-- sprout/variant/variant.hpp | 7 ++++--- 78 files changed, 178 insertions(+), 225 deletions(-) diff --git a/sprout/algorithm/fixed/clamp_range_copy.hpp b/sprout/algorithm/fixed/clamp_range_copy.hpp index 6ef3c0be..afe8d93c 100644 --- a/sprout/algorithm/fixed/clamp_range_copy.hpp +++ b/sprout/algorithm/fixed/clamp_range_copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,7 @@ namespace sprout { { return sprout::fixed::detail::clamp_range_copy_impl_ra( first, last, result, low, high, comp, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/copy.hpp b/sprout/algorithm/fixed/copy.hpp index 5cb8b2e1..d5492058 100644 --- a/sprout/algorithm/fixed/copy.hpp +++ b/sprout/algorithm/fixed/copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,7 @@ namespace sprout { { return sprout::fixed::detail::copy_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/copy_backward.hpp b/sprout/algorithm/fixed/copy_backward.hpp index 98d35595..48c0b4c7 100644 --- a/sprout/algorithm/fixed/copy_backward.hpp +++ b/sprout/algorithm/fixed/copy_backward.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,7 @@ namespace sprout { { return sprout::fixed::detail::copy_backward_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_end_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/fill.hpp b/sprout/algorithm/fixed/fill.hpp index 6b809c99..d3d8b55e 100644 --- a/sprout/algorithm/fixed/fill.hpp +++ b/sprout/algorithm/fixed/fill.hpp @@ -39,7 +39,7 @@ namespace sprout { fill(Container const& cont, T const& value) { return sprout::fixed::detail::fill_impl( cont, value, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(cont), sprout::size(cont) ); diff --git a/sprout/algorithm/fixed/fill_n.hpp b/sprout/algorithm/fixed/fill_n.hpp index 392048d9..8b9ae33b 100644 --- a/sprout/algorithm/fixed/fill_n.hpp +++ b/sprout/algorithm/fixed/fill_n.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace sprout { fill_n(Container const& cont, Size n, T const& value) { return sprout::fixed::detail::fill_impl( cont, value, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(cont), n ); diff --git a/sprout/algorithm/fixed/replace_copy.hpp b/sprout/algorithm/fixed/replace_copy.hpp index 3aa425e7..86611c49 100644 --- a/sprout/algorithm/fixed/replace_copy.hpp +++ b/sprout/algorithm/fixed/replace_copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,7 @@ namespace sprout { return sprout::fixed::detail::replace_copy_impl_ra( first, last, result, old_value, new_value, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/replace_copy_if.hpp b/sprout/algorithm/fixed/replace_copy_if.hpp index e39cd701..41c24b01 100644 --- a/sprout/algorithm/fixed/replace_copy_if.hpp +++ b/sprout/algorithm/fixed/replace_copy_if.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,7 @@ namespace sprout { return sprout::fixed::detail::replace_copy_if_impl_ra( first, last, result, pred, new_value, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/reverse_copy.hpp b/sprout/algorithm/fixed/reverse_copy.hpp index 9f69f8e1..2a877383 100644 --- a/sprout/algorithm/fixed/reverse_copy.hpp +++ b/sprout/algorithm/fixed/reverse_copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -44,7 +45,7 @@ namespace sprout { { return sprout::fixed::detail::reverse_copy_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/rotate_copy.hpp b/sprout/algorithm/fixed/rotate_copy.hpp index 9163859d..4ca6257f 100644 --- a/sprout/algorithm/fixed/rotate_copy.hpp +++ b/sprout/algorithm/fixed/rotate_copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -50,7 +51,7 @@ namespace sprout { return sprout::fixed::detail::rotate_copy_impl_ra( first, middle, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/shuffle.hpp b/sprout/algorithm/fixed/shuffle.hpp index e4a78ce9..8a923abe 100644 --- a/sprout/algorithm/fixed/shuffle.hpp +++ b/sprout/algorithm/fixed/shuffle.hpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -95,7 +96,7 @@ namespace sprout { shuffle(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::shuffle_impl( cont, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::forward(g), sprout::internal_begin_offset(cont), sprout::size(cont) diff --git a/sprout/algorithm/fixed/shuffle_result.hpp b/sprout/algorithm/fixed/shuffle_result.hpp index eaa17021..0fa334b8 100644 --- a/sprout/algorithm/fixed/shuffle_result.hpp +++ b/sprout/algorithm/fixed/shuffle_result.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -110,7 +111,7 @@ namespace sprout { shuffle_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::shuffle_result_impl( cont, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::forward(g), sprout::internal_begin_offset(cont), sprout::size(cont) diff --git a/sprout/algorithm/fixed/swap_element_copy.hpp b/sprout/algorithm/fixed/swap_element_copy.hpp index 675c13cd..606fec5c 100644 --- a/sprout/algorithm/fixed/swap_element_copy.hpp +++ b/sprout/algorithm/fixed/swap_element_copy.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -53,7 +54,7 @@ namespace sprout { first, last, result, pos1, pos2, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/algorithm/fixed/transform.hpp b/sprout/algorithm/fixed/transform.hpp index 22b61c15..caaabb45 100644 --- a/sprout/algorithm/fixed/transform.hpp +++ b/sprout/algorithm/fixed/transform.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,7 @@ namespace sprout { return sprout::fixed::detail::transform_impl_ra( first, last, result, op, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) @@ -165,7 +166,7 @@ namespace sprout { return sprout::fixed::detail::transform_impl_ra( first1, last1, first2, result, op, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first1, last1) diff --git a/sprout/algorithm/string/join.hpp b/sprout/algorithm/string/join.hpp index c41fb5d3..b0350cf1 100644 --- a/sprout/algorithm/string/join.hpp +++ b/sprout/algorithm/string/join.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -134,7 +135,7 @@ namespace sprout { > sizes_type; return sprout::algorithm::detail::join_impl_ra_1( sprout::begin(cont_cont), - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::range::partial_sum( cont_cont | sprout::adaptors::size_enumed, sprout::pit() @@ -323,7 +324,7 @@ namespace sprout { return sprout::algorithm::detail::join_impl_ra_1( sprout::begin(cont_cont), sprout::begin(separator), - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::range::partial_sum( cont_cont | sprout::adaptors::size_enumed(sprout::algorithm::detail::str_size(separator), true), sprout::pit() diff --git a/sprout/array/array.hpp b/sprout/array/array.hpp index 665872e1..96ba8a79 100644 --- a/sprout/array/array.hpp +++ b/sprout/array/array.hpp @@ -227,7 +227,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::array to_array(T const (& arr)[N]) { - return sprout::detail::to_array_impl(arr, sprout::index_range<0, N>::make()); + return sprout::detail::to_array_impl(arr, sprout::make_index_tuple::make()); } } // namespace sprout diff --git a/sprout/bitset/bitset.hpp b/sprout/bitset/bitset.hpp index 42647435..eaa8dc1e 100644 --- a/sprout/bitset/bitset.hpp +++ b/sprout/bitset/bitset.hpp @@ -165,11 +165,11 @@ namespace sprout { return offset == 0 ? do_left_shift_impl_1( wshift, offset, - sprout::index_range<0, N>::make() + sprout::make_index_tuple::make() ) : do_left_shift_impl_2( wshift, offset, (CHAR_BIT * sprout::detail::sizeof_::value) - offset, - sprout::index_range<0, N>::make() + sprout::make_index_tuple::make() ) ; } @@ -209,11 +209,11 @@ namespace sprout { return offset == 0 ? do_right_shift_impl_1( wshift, offset, limit, - sprout::index_range<0, N>::make() + sprout::make_index_tuple::make() ) : do_right_shift_impl_2( wshift, offset, limit, (CHAR_BIT * sprout::detail::sizeof_::value) - offset, - sprout::index_range<0, N>::make() + sprout::make_index_tuple::make() ) ; } diff --git a/sprout/breed/detail/deduce_domain.hpp b/sprout/breed/detail/deduce_domain.hpp index b34db935..e80afc4c 100644 --- a/sprout/breed/detail/deduce_domain.hpp +++ b/sprout/breed/detail/deduce_domain.hpp @@ -215,7 +215,7 @@ namespace sprout { template struct deduce_domain : public sprout::breed::detail::deduce_domain_impl< - typename sprout::index_range<0, sizeof...(Args)>::type, + typename sprout::make_index_tuple::type, Args... > {}; diff --git a/sprout/breed/generate.hpp b/sprout/breed/generate.hpp index 6021feb0..c8237cfd 100644 --- a/sprout/breed/generate.hpp +++ b/sprout/breed/generate.hpp @@ -55,7 +55,7 @@ namespace sprout { } public: static SPROUT_CONSTEXPR type call(src_type const& e) { - return call_impl(sprout::index_range<0, sizeof...(Args)>::make()); + return call_impl(sprout::make_index_tuple::make()); } }; template @@ -74,7 +74,7 @@ namespace sprout { } public: static SPROUT_CONSTEXPR type call(src_type const& e) { - return call_impl(sprout::index_range<0, sizeof...(Args)>::make()); + return call_impl(sprout::make_index_tuple::make()); } }; } // namespace detail diff --git a/sprout/breed/transform/pass_through.hpp b/sprout/breed/transform/pass_through.hpp index 33eb084b..ce6ad919 100644 --- a/sprout/breed/transform/pass_through.hpp +++ b/sprout/breed/transform/pass_through.hpp @@ -42,7 +42,7 @@ namespace sprout { typedef typename sprout::breed::base_expr< typename unref_expr::breed_domain, typename unref_expr::breed_tag, - typename list_impl::type>::type + typename list_impl::type>::type >::type expr_type; typedef typename unref_expr::breed_generator breed_generator; typedef typename sprout::breed::detail::std_result_of< @@ -74,7 +74,7 @@ namespace sprout { typename pass_through_impl::data_param d ) const { - return call_impl(e, s, d, sprout::index_range<0, Arity>::make()); + return call_impl(e, s, d, sprout::make_index_tuple::make()); } }; template diff --git a/sprout/container/indexes.hpp b/sprout/container/indexes.hpp index ab88a7c2..93c181d6 100644 --- a/sprout/container/indexes.hpp +++ b/sprout/container/indexes.hpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include namespace sprout { namespace containers { @@ -14,7 +14,7 @@ namespace sprout { template struct container_indexes : public sprout::detail::make_indexes_helper< - sprout::index_range<0, sprout::container_traits::static_size> + sprout::make_index_tuple::static_size> > {}; } // namespace containers diff --git a/sprout/darkroom/lights/light_list.hpp b/sprout/darkroom/lights/light_list.hpp index 8673f76a..2bfc9fe1 100644 --- a/sprout/darkroom/lights/light_list.hpp +++ b/sprout/darkroom/lights/light_list.hpp @@ -51,7 +51,7 @@ namespace sprout { template SPROUT_CONSTEXPR color_type operator()(Intersection const& inter, Objects const& objs) const { - return shade_1(inter, objs, sprout::index_range<0, sizeof...(Lights)>::make()); + return shade_1(inter, objs, sprout::make_index_tuple::make()); } }; // diff --git a/sprout/darkroom/pixels/generate.hpp b/sprout/darkroom/pixels/generate.hpp index f6ebe141..973409bd 100644 --- a/sprout/darkroom/pixels/generate.hpp +++ b/sprout/darkroom/pixels/generate.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace sprout { @@ -77,12 +78,7 @@ namespace sprout { sprout::darkroom::pixels::detail::generate_impl_line( raytracer, renderer, camera, objs, lights, x, y + YIndexes, width, height, depth_max, - sprout::index_range< - 0, - sprout::container_traits< - typename sprout::container_traits::value_type - >::static_size - >::make() + sprout::container_indexes::value_type>::make() )... ); } @@ -115,10 +111,7 @@ namespace sprout { return sprout::darkroom::pixels::detail::generate_impl( raytracer, renderer, camera, objs, lights, x, y, width, height, depth_max, - sprout::index_range< - 0, - sprout::container_traits::static_size - >::make() + sprout::container_indexes::make() ); } diff --git a/sprout/functional/bind/bind.hpp b/sprout/functional/bind/bind.hpp index 54230baa..069c8416 100644 --- a/sprout/functional/bind/bind.hpp +++ b/sprout/functional/bind/bind.hpp @@ -181,7 +181,7 @@ namespace sprout { SPROUT_CONSTEXPR auto operator()(CVArg& arg, sprout::tuples::tuple& tuple) const volatile -> decltype(arg(std::declval()...)) { - return call(arg, tuple, sprout::index_range<0, sizeof...(Args)>::make()); + return call(arg, tuple, sprout::make_index_tuple::make()); } }; template @@ -277,7 +277,7 @@ namespace sprout { { private: typedef binder self_type; - typedef typename sprout::index_range<0, sizeof...(BoundArgs)>::type bound_indexes; + typedef typename sprout::make_index_tuple::type bound_indexes; private: Functor f_; sprout::tuples::tuple bound_args_; @@ -385,7 +385,7 @@ namespace sprout { class bind_result { private: typedef bind_result self_type; - typedef typename sprout::index_range<0, sizeof...(BoundArgs)>::type bound_indexes; + typedef typename sprout::make_index_tuple::type bound_indexes; private: template struct enable_if_void diff --git a/sprout/io.hpp b/sprout/io.hpp index cc28bc63..1f2b6fd7 100644 --- a/sprout/io.hpp +++ b/sprout/io.hpp @@ -762,7 +762,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::basic_string output_impl(Args const&... args) { return sprout::io::detail::output_impl_1( - sprout::index_range<0, N>::make(), + sprout::make_index_tuple::make(), sprout::range::partial_sum( sprout::array{{args.size()...}}, sprout::pit >() @@ -786,7 +786,7 @@ namespace sprout { output(Expression const& expr) { return sprout::io::detail::output( expr, - sprout::index_range<0, sprout::io::leaf_count::value>::make() + sprout::make_index_tuple::value>::make() ); } } // namespace io diff --git a/sprout/numeric/dft/fixed/amplitude_spectrum.hpp b/sprout/numeric/dft/fixed/amplitude_spectrum.hpp index d3a61ca8..2cebc8bc 100644 --- a/sprout/numeric/dft/fixed/amplitude_spectrum.hpp +++ b/sprout/numeric/dft/fixed/amplitude_spectrum.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace sprout { { return sprout::fixed::detail::amplitude_spectrum_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/numeric/dft/fixed/dft.hpp b/sprout/numeric/dft/fixed/dft.hpp index 6d02ae43..91cdeec0 100644 --- a/sprout/numeric/dft/fixed/dft.hpp +++ b/sprout/numeric/dft/fixed/dft.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace sprout { { return sprout::fixed::detail::dft_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/numeric/dft/fixed/idft.hpp b/sprout/numeric/dft/fixed/idft.hpp index efb9b7df..c66555a3 100644 --- a/sprout/numeric/dft/fixed/idft.hpp +++ b/sprout/numeric/dft/fixed/idft.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace sprout { { return sprout::fixed::detail::idft_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/numeric/dft/fixed/phase_spectrum.hpp b/sprout/numeric/dft/fixed/phase_spectrum.hpp index 720c4612..6016a181 100644 --- a/sprout/numeric/dft/fixed/phase_spectrum.hpp +++ b/sprout/numeric/dft/fixed/phase_spectrum.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace sprout { { return sprout::fixed::detail::phase_spectrum_impl_ra( first, last, result, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::internal_begin_offset(result), sprout::size(result), sprout::distance(first, last) diff --git a/sprout/numeric/fft/fixed/bitrev_table.hpp b/sprout/numeric/fft/fixed/bitrev_table.hpp index 552a5b0c..e75ead6d 100644 --- a/sprout/numeric/fft/fixed/bitrev_table.hpp +++ b/sprout/numeric/fft/fixed/bitrev_table.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ namespace sprout { bitrev_table(Container const& cont) { return sprout::fixed::detail::bitrev_table_impl( cont, - sprout::index_range<0, sprout::container_traits::static_size>::make(), + sprout::container_indexes::make(), sprout::empty(cont) ? 0 : sprout::bit_length(sprout::size(cont) - 1) , diff --git a/sprout/numeric/fixed/iota.hpp b/sprout/numeric/fixed/iota.hpp index b2977403..bf0ab97d 100644 --- a/sprout/numeric/fixed/iota.hpp +++ b/sprout/numeric/fixed/iota.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,7 @@ namespace sprout { >::type iota(Container const& cont, T value) { return sprout::fixed::detail::iota_impl( - cont, sprout::index_range<0, sprout::container_traits::static_size>::make(), + cont, sprout::container_indexes::make(), value, sprout::internal_begin_offset(cont), sprout::size(cont) diff --git a/sprout/operation/fixed/append.hpp b/sprout/operation/fixed/append.hpp index d49fc84a..fec5b797 100644 --- a/sprout/operation/fixed/append.hpp +++ b/sprout/operation/fixed/append.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -60,10 +61,7 @@ namespace sprout { { return sprout::fixed::detail::append_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos), sprout::size(input), input @@ -78,10 +76,7 @@ namespace sprout { { return sprout::fixed::detail::append_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), sprout::size(input), input diff --git a/sprout/operation/fixed/append_back.hpp b/sprout/operation/fixed/append_back.hpp index 61938ac3..65192567 100644 --- a/sprout/operation/fixed/append_back.hpp +++ b/sprout/operation/fixed/append_back.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { append_back(Container const& cont, Input const& input) { return sprout::fixed::detail::append_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_end_offset(cont), sprout::size(input), input diff --git a/sprout/operation/fixed/append_front.hpp b/sprout/operation/fixed/append_front.hpp index 43640502..98517766 100644 --- a/sprout/operation/fixed/append_front.hpp +++ b/sprout/operation/fixed/append_front.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { append_front(Container const& cont, Input const& input) { return sprout::fixed::detail::append_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_begin_offset(cont), sprout::size(input), input diff --git a/sprout/operation/fixed/erase.hpp b/sprout/operation/fixed/erase.hpp index e07fb8c2..0c105760 100644 --- a/sprout/operation/fixed/erase.hpp +++ b/sprout/operation/fixed/erase.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -54,10 +55,7 @@ namespace sprout { erase(Container const& cont, typename sprout::container_traits::const_iterator pos) { return sprout::fixed::detail::erase_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos) ); } @@ -69,10 +67,7 @@ namespace sprout { erase(Container const& cont, typename sprout::container_traits::difference_type pos) { return sprout::fixed::detail::erase_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) ); } diff --git a/sprout/operation/fixed/erase_n.hpp b/sprout/operation/fixed/erase_n.hpp index 3ea50e59..4dd0eb64 100644 --- a/sprout/operation/fixed/erase_n.hpp +++ b/sprout/operation/fixed/erase_n.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -55,10 +56,7 @@ namespace sprout { erase_n(Container const& cont, typename sprout::container_traits::const_iterator pos) { return sprout::fixed::detail::erase_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos) ); } @@ -67,10 +65,7 @@ namespace sprout { erase_n(Container const& cont, typename sprout::container_traits::difference_type pos) { return sprout::fixed::detail::erase_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)) ); } diff --git a/sprout/operation/fixed/insert.hpp b/sprout/operation/fixed/insert.hpp index 5bf9f851..ca6b114d 100644 --- a/sprout/operation/fixed/insert.hpp +++ b/sprout/operation/fixed/insert.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -60,10 +61,7 @@ namespace sprout { { return sprout::fixed::detail::insert_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos), v, values... @@ -78,10 +76,7 @@ namespace sprout { { return sprout::fixed::detail::insert_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), v, values... diff --git a/sprout/operation/fixed/insert_n.hpp b/sprout/operation/fixed/insert_n.hpp index 2115e835..6ea6e4aa 100644 --- a/sprout/operation/fixed/insert_n.hpp +++ b/sprout/operation/fixed/insert_n.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -63,10 +64,7 @@ namespace sprout { { return sprout::fixed::detail::insert_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos), v, values... @@ -84,10 +82,7 @@ namespace sprout { { return sprout::fixed::detail::insert_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), v, values... diff --git a/sprout/operation/fixed/pop_back.hpp b/sprout/operation/fixed/pop_back.hpp index 6d44d1c2..dda3ef02 100644 --- a/sprout/operation/fixed/pop_back.hpp +++ b/sprout/operation/fixed/pop_back.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { pop_back(Container const& cont) { return sprout::fixed::detail::erase_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_end_offset(cont) - 1 ); } diff --git a/sprout/operation/fixed/pop_back_n.hpp b/sprout/operation/fixed/pop_back_n.hpp index 364cc664..98cc0458 100644 --- a/sprout/operation/fixed/pop_back_n.hpp +++ b/sprout/operation/fixed/pop_back_n.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { pop_back_n(Container const& cont) { return sprout::fixed::detail::erase_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_end_offset(cont) - N ); } diff --git a/sprout/operation/fixed/pop_front.hpp b/sprout/operation/fixed/pop_front.hpp index e8db5d67..25d24bab 100644 --- a/sprout/operation/fixed/pop_front.hpp +++ b/sprout/operation/fixed/pop_front.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { pop_front(Container const& cont) { return sprout::fixed::detail::erase_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/operation/fixed/pop_front_n.hpp b/sprout/operation/fixed/pop_front_n.hpp index 1e484c13..bee36742 100644 --- a/sprout/operation/fixed/pop_front_n.hpp +++ b/sprout/operation/fixed/pop_front_n.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { pop_front_n(Container const& cont) { return sprout::fixed::detail::erase_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/operation/fixed/push_back.hpp b/sprout/operation/fixed/push_back.hpp index 7f8124bd..2cbaa0e4 100644 --- a/sprout/operation/fixed/push_back.hpp +++ b/sprout/operation/fixed/push_back.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { push_back(Container const& cont, T const& v, Values const&... values) { return sprout::fixed::detail::insert_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_end_offset(cont), v, values... diff --git a/sprout/operation/fixed/push_back_n.hpp b/sprout/operation/fixed/push_back_n.hpp index 54ce8538..26be9e77 100644 --- a/sprout/operation/fixed/push_back_n.hpp +++ b/sprout/operation/fixed/push_back_n.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { push_back_n(Container const& cont, T const& v, Values const&... values) { return sprout::fixed::detail::insert_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_end_offset(cont), v, values... diff --git a/sprout/operation/fixed/push_front.hpp b/sprout/operation/fixed/push_front.hpp index e7000241..59f77eae 100644 --- a/sprout/operation/fixed/push_front.hpp +++ b/sprout/operation/fixed/push_front.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { push_front(Container const& cont, T const& v, Values const&... values) { return sprout::fixed::detail::insert_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_begin_offset(cont), v, values... diff --git a/sprout/operation/fixed/push_front_n.hpp b/sprout/operation/fixed/push_front_n.hpp index 25b8aa62..8666a6fd 100644 --- a/sprout/operation/fixed/push_front_n.hpp +++ b/sprout/operation/fixed/push_front_n.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -28,10 +29,7 @@ namespace sprout { push_front_n(Container const& cont, T const& v, Values const&... values) { return sprout::fixed::detail::insert_n_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::internal_begin_offset(cont), v, values... diff --git a/sprout/operation/fixed/realign.hpp b/sprout/operation/fixed/realign.hpp index 27ca418b..48f9cd6f 100644 --- a/sprout/operation/fixed/realign.hpp +++ b/sprout/operation/fixed/realign.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -44,10 +45,7 @@ namespace sprout { realign(Container const& cont, T const& v) { return sprout::fixed::detail::realign_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont), v ); @@ -77,10 +75,7 @@ namespace sprout { realign(Container const& cont) { return sprout::fixed::detail::realign_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont) ); } diff --git a/sprout/operation/fixed/realign_to.hpp b/sprout/operation/fixed/realign_to.hpp index 050c6821..6373d4b9 100644 --- a/sprout/operation/fixed/realign_to.hpp +++ b/sprout/operation/fixed/realign_to.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -29,10 +30,7 @@ namespace sprout { realign_to(Container const& cont, T const& v) { return sprout::fixed::detail::realign_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont), v ); @@ -46,10 +44,7 @@ namespace sprout { realign_to(Container const& cont) { return sprout::fixed::detail::realign_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont) ); } diff --git a/sprout/operation/fixed/resize.hpp b/sprout/operation/fixed/resize.hpp index c5ae5bbd..149e5585 100644 --- a/sprout/operation/fixed/resize.hpp +++ b/sprout/operation/fixed/resize.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include namespace sprout { @@ -48,10 +49,7 @@ namespace sprout { resize(Container const& cont, T const& v) { return sprout::fixed::detail::resize_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont), v ); @@ -81,10 +79,7 @@ namespace sprout { resize(Container const& cont) { return sprout::fixed::detail::resize_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont) ); } diff --git a/sprout/operation/fixed/resize_backward.hpp b/sprout/operation/fixed/resize_backward.hpp index 76f318a0..767c4380 100644 --- a/sprout/operation/fixed/resize_backward.hpp +++ b/sprout/operation/fixed/resize_backward.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -47,10 +48,7 @@ namespace sprout { resize_backward(Container const& cont, T const& v) { return sprout::fixed::detail::resize_backward_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont), static_cast::difference_type>( sprout::container_traits::type>::static_size @@ -85,10 +83,7 @@ namespace sprout { resize_backward(Container const& cont) { return sprout::fixed::detail::resize_backward_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::size(cont), static_cast::difference_type>( sprout::container_traits::type>::static_size diff --git a/sprout/operation/fixed/set.hpp b/sprout/operation/fixed/set.hpp index 79f44df8..afa4df8f 100644 --- a/sprout/operation/fixed/set.hpp +++ b/sprout/operation/fixed/set.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -46,10 +47,7 @@ namespace sprout { set(Container const& cont, typename sprout::container_traits::const_iterator pos, T const& v) { return sprout::fixed::detail::set_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), pos), v ); @@ -59,10 +57,7 @@ namespace sprout { set(Container const& cont, typename sprout::container_traits::difference_type pos, T const& v) { return sprout::fixed::detail::set_impl::type>( cont, - sprout::index_range< - 0, - sprout::container_traits::type>::static_size - >::make(), + sprout::container_indexes::type>::make(), sprout::distance(sprout::internal_begin(cont), sprout::next(sprout::begin(cont), pos)), v ); diff --git a/sprout/range/adaptor/piped.hpp b/sprout/range/adaptor/piped.hpp index 1db44c5d..91ef8b69 100644 --- a/sprout/range/adaptor/piped.hpp +++ b/sprout/range/adaptor/piped.hpp @@ -60,13 +60,13 @@ namespace sprout { -> decltype( sprout::adaptors::detail::apply_adaptors_tuple_impl( sprout::forward(range), adaptors, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::make_index_tuple::value>::make() ) ) { return sprout::adaptors::detail::apply_adaptors_tuple_impl( sprout::forward(range), adaptors, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::make_index_tuple::value>::make() ); } } // namespace detail diff --git a/sprout/string/concat.hpp b/sprout/string/concat.hpp index 25f7c075..1b2c64a7 100644 --- a/sprout/string/concat.hpp +++ b/sprout/string/concat.hpp @@ -111,7 +111,7 @@ namespace sprout { return sprout::detail::string_concat( lhs, lhs.size(), rhs, - sprout::index_range<0, N + 1>::make() + sprout::make_index_tuple::make() ); } template @@ -120,7 +120,7 @@ namespace sprout { return sprout::detail::string_concat( lhs, rhs, rhs.size(), - sprout::index_range<0, 1 + N>::make() + sprout::make_index_tuple<1 + N>::make() ); } template @@ -130,7 +130,7 @@ namespace sprout { return sprout::detail::string_concat( lhs, lhs.size(), rhs, traits_type::length(rhs, M - 1), - sprout::index_range<0, N + (M - 1)>::make() + sprout::make_index_tuple::make() ); } template @@ -140,7 +140,7 @@ namespace sprout { return sprout::detail::string_concat( lhs, traits_type::length(lhs, M - 1), rhs, rhs.size(), - sprout::index_range<0, (M - 1) + N>::make() + sprout::make_index_tuple<(M - 1) + N>::make() ); } template @@ -149,7 +149,7 @@ namespace sprout { return sprout::detail::string_concat( lhs, lhs.size(), rhs, rhs.size(), - sprout::index_range<0, N1 + N2>::make() + sprout::make_index_tuple::make() ); } } // namespace sprout diff --git a/sprout/string/float_to_string.hpp b/sprout/string/float_to_string.hpp index 7f15052d..ecfbe461 100644 --- a/sprout/string/float_to_string.hpp +++ b/sprout/string/float_to_string.hpp @@ -65,7 +65,7 @@ namespace sprout { float_to_string(FloatType val, bool negative, int digits) { return sprout::detail::float_to_string_impl( val, negative, digits, static_cast((val - sprout::floor(val)) * sprout::detail::int_pow(sprout::detail::decimal_places_length)), - sprout::index_range<0, sprout::printed_float_digits::value - 1>::make() + sprout::make_index_tuple::value - 1>::make() ); } } // namespace detail @@ -164,7 +164,7 @@ namespace sprout { val < 0, sprout::detail::float_exponent10(val), NS_SSCRISK_CEL_OR_SPROUT::max(sprout::detail::int_digits(sprout::detail::float_exponent10(val)), 2), - sprout::index_range<0, sprout::printed_float_exp_digits::value - 1>::make() + sprout::make_index_tuple::value - 1>::make() ); } diff --git a/sprout/string/int_to_string.hpp b/sprout/string/int_to_string.hpp index 99006916..23277615 100644 --- a/sprout/string/int_to_string.hpp +++ b/sprout/string/int_to_string.hpp @@ -80,7 +80,7 @@ namespace sprout { return sprout::detail::int_to_string( val, sprout::detail::int_digits(val), - sprout::index_range<0, sprout::integer_digits::value>::make() + sprout::make_index_tuple::value>::make() ); } diff --git a/sprout/string/shrink.hpp b/sprout/string/shrink.hpp index ed4e0abb..57cd9ddc 100644 --- a/sprout/string/shrink.hpp +++ b/sprout/string/shrink.hpp @@ -45,7 +45,7 @@ namespace sprout { return implicit_conversion_impl( holder_.get().elems, NS_SSCRISK_CEL_OR_SPROUT::min(N2, holder_.get().len), - sprout::index_range<0, NS_SSCRISK_CEL_OR_SPROUT::min(N2, N)>::make() + sprout::make_index_tuple<(N < N2 ? N : N2)>::make() ); } }; diff --git a/sprout/string/string.hpp b/sprout/string/string.hpp index 364294d7..4daa13f5 100644 --- a/sprout/string/string.hpp +++ b/sprout/string/string.hpp @@ -92,7 +92,7 @@ namespace sprout { public: static SPROUT_CONSTEXPR basic_string from_c_str(T const* s, size_type n) { return !(N < n) - ? from_c_str_impl(s, n, sprout::index_range<0, N>::make()) + ? from_c_str_impl(s, n, sprout::make_index_tuple::make()) : throw std::out_of_range("basic_string<>: index out of range") ; } @@ -490,7 +490,7 @@ namespace sprout { SPROUT_CONSTEXPR operator basic_string() const { return implicit_conversion_impl( elems, size(), - sprout::index_range<0, N2>::make() + sprout::make_index_tuple::make() ); } #if SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS @@ -721,7 +721,7 @@ namespace sprout { make(Args&&... args) { return make_impl( length(args...), - sprout::index_range<0, sizeof...(Args)>::make(), + sprout::make_index_tuple::make(), sprout::forward(args)... ); } @@ -730,7 +730,7 @@ namespace sprout { make(typename copied_type::size_type size, Args&&... args) { return make_impl( size, - sprout::index_range<0, sizeof...(Args)>::make(), + sprout::make_index_tuple::make(), sprout::forward(args)... ); } @@ -751,7 +751,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::basic_string to_string_impl(T const(& arr)[N]) { typedef sprout::char_traits_helper::traits_type> helper_type; - return to_string_impl_1(arr, helper_type::length(arr, N - 1), sprout::index_range<0, N - 1>::make()); + return to_string_impl_1(arr, helper_type::length(arr, N - 1), sprout::make_index_tuple::make()); } } // namespace detail // diff --git a/sprout/sub_array/sub_array.hpp b/sprout/sub_array/sub_array.hpp index f97b5354..e702224f 100644 --- a/sprout/sub_array/sub_array.hpp +++ b/sprout/sub_array/sub_array.hpp @@ -203,7 +203,7 @@ namespace sprout { : impl_type( array_tag(), arr, - sprout::index_range<0, enumerable_size>::make(), + sprout::make_index_tuple::make(), first, last ) @@ -212,7 +212,7 @@ namespace sprout { : impl_type( array_tag(), arr, - sprout::index_range<0, enumerable_size>::make(), + sprout::make_index_tuple::make(), to_first, to_last ) @@ -221,7 +221,7 @@ namespace sprout { : impl_type( array_tag(), impl_type::template to_param(other.array_), - sprout::index_range<0, enumerable_size>::make(), + sprout::make_index_tuple::make(), sprout::distance(sprout::begin(other.get_array()), first), sprout::distance(sprout::begin(other.get_array()), last) ) @@ -230,7 +230,7 @@ namespace sprout { : impl_type( array_tag(), impl_type::template to_param(other.array_), - sprout::index_range<0, enumerable_size>::make(), + sprout::make_index_tuple::make(), other.to_first_ + to_first, other.to_first_ + to_last ) diff --git a/sprout/tuple/algorithm/copy.hpp b/sprout/tuple/algorithm/copy.hpp index d6a8b020..34d05fff 100644 --- a/sprout/tuple/algorithm/copy.hpp +++ b/sprout/tuple/algorithm/copy.hpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace sprout { namespace tuples { @@ -43,7 +44,7 @@ namespace sprout { return sprout::tuples::detail::copy_impl::type>( t, input, sprout::index_range::value, sprout::tuples::tuple_size::value>::make(), - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::tuple_indexes::make() ); } template @@ -55,7 +56,7 @@ namespace sprout { return sprout::tuples::detail::copy_impl::type>( t, input, sprout::index_tuple<>(), - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::tuple_indexes::make() ); } } // namespace detail diff --git a/sprout/tuple/fused.hpp b/sprout/tuple/fused.hpp index 8ab5bb09..8d2f7fe1 100644 --- a/sprout/tuple/fused.hpp +++ b/sprout/tuple/fused.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace sprout { @@ -35,7 +36,7 @@ namespace sprout { struct result : public result_impl< Tuple, - typename sprout::index_range<0, sprout::tuples::tuple_size::type>::value>::type + typename sprout::tuple_indexes::type>::type > {}; private: @@ -60,7 +61,7 @@ namespace sprout { operator()(Tuple&& t) const { return call::type>( sprout::forward(t), - sprout::index_range<0, sprout::tuples::tuple_size::type>::value>::make() + sprout::tuple_indexes::type>::make() ); } }; diff --git a/sprout/tuple/indexes.hpp b/sprout/tuple/indexes.hpp index 5eac5939..5648483d 100644 --- a/sprout/tuple/indexes.hpp +++ b/sprout/tuple/indexes.hpp @@ -15,7 +15,7 @@ namespace sprout { template struct tuple_indexes : public sprout::detail::make_indexes_helper< - sprout::index_range<0, sprout::tuples::tuple_size::value> + sprout::make_index_tuple::value> > {}; } // namespace tuples diff --git a/sprout/tuple/operation/append_back.hpp b/sprout/tuple/operation/append_back.hpp index a1b608ff..c72a8a09 100644 --- a/sprout/tuple/operation/append_back.hpp +++ b/sprout/tuple/operation/append_back.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -42,8 +43,8 @@ namespace sprout { append_back(Tuple const& t, InputTuple const& input) { return sprout::tuples::detail::append_back_impl::type>( t, input, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make(), - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::tuple_indexes::make(), + sprout::tuple_indexes::make() ); } } // namespace tuples diff --git a/sprout/tuple/operation/append_front.hpp b/sprout/tuple/operation/append_front.hpp index a6671c5c..3e2bb140 100644 --- a/sprout/tuple/operation/append_front.hpp +++ b/sprout/tuple/operation/append_front.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -42,8 +43,8 @@ namespace sprout { append_front(Tuple const& t, InputTuple const& input) { return sprout::tuples::detail::append_front_impl::type>( t, input, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make(), - sprout::index_range<0, sprout::tuples::tuple_size::value>::make() + sprout::tuple_indexes::make(), + sprout::tuple_indexes::make() ); } } // namespace tuples diff --git a/sprout/tuple/operation/pop_back.hpp b/sprout/tuple/operation/pop_back.hpp index 77418692..485f9d57 100644 --- a/sprout/tuple/operation/pop_back.hpp +++ b/sprout/tuple/operation/pop_back.hpp @@ -37,7 +37,7 @@ namespace sprout { pop_back(Tuple const& t) { return sprout::tuples::detail::pop_back_impl::type>( t, - sprout::index_range<0, sprout::tuples::tuple_size::value - 1>::make() + sprout::make_index_tuple::value - 1>::make() ); } } // namespace tuples diff --git a/sprout/tuple/operation/push_back.hpp b/sprout/tuple/operation/push_back.hpp index 3b44326f..9e450d4c 100644 --- a/sprout/tuple/operation/push_back.hpp +++ b/sprout/tuple/operation/push_back.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -38,7 +39,7 @@ namespace sprout { push_back(Tuple const& t, Args const&... args) { return sprout::tuples::detail::push_back_impl::type>( t, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make(), + sprout::tuple_indexes::make(), args... ); } diff --git a/sprout/tuple/operation/push_front.hpp b/sprout/tuple/operation/push_front.hpp index 3fec44fd..1478a197 100644 --- a/sprout/tuple/operation/push_front.hpp +++ b/sprout/tuple/operation/push_front.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace sprout { @@ -38,7 +39,7 @@ namespace sprout { push_front(Tuple const& t, Args const&... args) { return sprout::tuples::detail::push_front_impl::type>( t, - sprout::index_range<0, sprout::tuples::tuple_size::value>::make(), + sprout::tuple_indexes::make(), args... ); } diff --git a/sprout/tuple/traits.hpp b/sprout/tuple/traits.hpp index 9488c6ac..12283377 100644 --- a/sprout/tuple/traits.hpp +++ b/sprout/tuple/traits.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -67,7 +68,7 @@ namespace sprout { public: typedef typename sprout::tuples::detail::default_copied< Tuple, - typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type + typename sprout::tuple_indexes::type >::type copied_type; public: template diff --git a/sprout/tuple/tuple/hash.hpp b/sprout/tuple/tuple/hash.hpp index 4673cfbd..32c54b00 100644 --- a/sprout/tuple/tuple/hash.hpp +++ b/sprout/tuple/tuple/hash.hpp @@ -26,7 +26,7 @@ namespace sprout { hash_value(sprout::tuples::tuple const& v) { return sprout::tuples::detail::tuple_hash_value_impl( v, - sprout::index_range<0, sprout::tuples::tuple_size >::value>::make() + sprout::make_index_tuple::make() ); } } // namespace tuples diff --git a/sprout/tuple/tuple/make_tuple.hpp b/sprout/tuple/tuple/make_tuple.hpp index 4de14393..55817d1b 100644 --- a/sprout/tuple/tuple/make_tuple.hpp +++ b/sprout/tuple/tuple/make_tuple.hpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace sprout { namespace tuples { @@ -57,7 +58,7 @@ namespace sprout { }; public: typedef typename make< - Tuple, typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type + Tuple, typename sprout::tuple_indexes::type >::type type; }; template @@ -76,8 +77,8 @@ namespace sprout { public: typedef typename sprout::tuples::result_of::detail::tuple_cat_impl< typename make< - T, typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type, - U, typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type + T, typename sprout::tuple_indexes::type, + U, typename sprout::tuple_indexes::type >::type, Tuples... >::type type; @@ -104,9 +105,7 @@ namespace sprout { }; template struct tuple_cat_1st_indexes - : public sprout::index_range< - 0, sprout::tuples::tuple_size::type>::value - > + : public sprout::tuple_indexes::type> {}; template diff --git a/sprout/tuple/tuple/tuple_decl.hpp b/sprout/tuple/tuple/tuple_decl.hpp index a0bcaaf2..6047d5ef 100644 --- a/sprout/tuple/tuple/tuple_decl.hpp +++ b/sprout/tuple/tuple/tuple_decl.hpp @@ -264,7 +264,7 @@ namespace sprout { template struct is_flexibly_convert_constructible : public is_flexibly_convert_constructible_impl< - typename sprout::index_range<0, (sizeof...(UTypes) < sizeof...(Types) ? sizeof...(UTypes) : sizeof...(Types))>::type, + typename sprout::make_index_tuple<(sizeof...(UTypes) < sizeof...(Types) ? sizeof...(UTypes) : sizeof...(Types))>::type, UTypes... > {}; diff --git a/sprout/type/operation/append_back.hpp b/sprout/type/operation/append_back.hpp index 076b512c..2ba30298 100644 --- a/sprout/type/operation/append_back.hpp +++ b/sprout/type/operation/append_back.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace sprout { namespace types { @@ -27,8 +28,8 @@ namespace sprout { {}; public: typedef typename apply_impl< - typename sprout::index_range<0, sprout::types::tuple_size::value>::type, - typename sprout::index_range<0, sprout::types::tuple_size::value>::type + typename sprout::tuple_indexes::type, + typename sprout::tuple_indexes::type >::type type; }; } // namespace types diff --git a/sprout/type/operation/append_front.hpp b/sprout/type/operation/append_front.hpp index 2e8ae3d4..ef2675b4 100644 --- a/sprout/type/operation/append_front.hpp +++ b/sprout/type/operation/append_front.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace sprout { namespace types { @@ -27,8 +28,8 @@ namespace sprout { {}; public: typedef typename apply_impl< - typename sprout::index_range<0, sprout::types::tuple_size::value>::type, - typename sprout::index_range<0, sprout::types::tuple_size::value>::type + typename sprout::tuple_indexes::type, + typename sprout::tuple_indexes::type >::type type; }; } // namespace types diff --git a/sprout/type/operation/pop_back.hpp b/sprout/type/operation/pop_back.hpp index a1bfa46f..4894c65a 100644 --- a/sprout/type/operation/pop_back.hpp +++ b/sprout/type/operation/pop_back.hpp @@ -26,7 +26,7 @@ namespace sprout { {}; public: typedef typename apply_impl< - typename sprout::index_range<0, sprout::types::tuple_size::value - 1>::type + typename sprout::make_index_tuple::value - 1>::type >::type type; }; } // namespace types diff --git a/sprout/type/operation/push_back.hpp b/sprout/type/operation/push_back.hpp index 5e7c6b41..9e327a5a 100644 --- a/sprout/type/operation/push_back.hpp +++ b/sprout/type/operation/push_back.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace sprout { namespace types { @@ -28,7 +29,7 @@ namespace sprout { {}; public: typedef typename apply_impl< - typename sprout::index_range<0, sprout::types::tuple_size::value>::type + typename sprout::tuple_indexes::type >::type type; }; } // namespace types diff --git a/sprout/type/operation/push_front.hpp b/sprout/type/operation/push_front.hpp index 4a204de0..a772b594 100644 --- a/sprout/type/operation/push_front.hpp +++ b/sprout/type/operation/push_front.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace sprout { namespace types { @@ -28,7 +29,7 @@ namespace sprout { {}; public: typedef typename apply_impl< - typename sprout::index_range<0, sprout::types::tuple_size::value>::type + typename sprout::tuple_indexes::type >::type type; }; } // namespace types diff --git a/sprout/type/string/to_string.hpp b/sprout/type/string/to_string.hpp index d14570b8..ca8fe324 100644 --- a/sprout/type/string/to_string.hpp +++ b/sprout/type/string/to_string.hpp @@ -36,7 +36,7 @@ namespace sprout { }; public: typedef typename impl< - typename sprout::index_range<0, sprout::size(Proxy()())>::type + typename sprout::make_index_tuple::type >::type type; }; namespace detail { diff --git a/sprout/type/string/to_string_constant.hpp b/sprout/type/string/to_string_constant.hpp index cd7134c0..9f504c56 100644 --- a/sprout/type/string/to_string_constant.hpp +++ b/sprout/type/string/to_string_constant.hpp @@ -53,7 +53,7 @@ namespace sprout { sprout::types::detail::str_length::value > to_string_constant() { return sprout::types::detail::to_string_constant_impl( - sprout::index_range<0, sprout::types::detail::str_length::value>::make() + sprout::make_index_tuple::value>::make() ); } } // namespace types diff --git a/sprout/utility/pair/pair.hpp b/sprout/utility/pair/pair.hpp index de6d9c27..d965ceb6 100644 --- a/sprout/utility/pair/pair.hpp +++ b/sprout/utility/pair/pair.hpp @@ -80,8 +80,8 @@ namespace sprout { : pair( first_args, second_args, - sprout::index_range<0, sizeof...(Args1)>::make(), - sprout::index_range<0, sizeof...(Args2)>::make() + sprout::make_index_tuple::make(), + sprout::make_index_tuple::make() ) {} #endif // #if SPROUT_USE_DELEGATING_CONSTRUCTORS diff --git a/sprout/variant/variant.hpp b/sprout/variant/variant.hpp index 9d8cff48..b83d50f6 100644 --- a/sprout/variant/variant.hpp +++ b/sprout/variant/variant.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR variant_impl(T&& operand, Index) - : tuple_(init(sprout::forward(operand), sprout::index_range<0, Index::value>::make())) + : tuple_(init(sprout::forward(operand), sprout::make_index_tuple::make())) , which_(Index::value) { static_assert(Index::value < sizeof...(Types), "variant<>: invalid operand"); @@ -113,7 +114,7 @@ namespace sprout { && !sprout::has_result_type >::value >::type > - : public visitor_result_impl_2::value>::type> + : public visitor_result_impl_2::type> {}; template struct visitor_result_impl< @@ -123,7 +124,7 @@ namespace sprout { && !sprout::has_result_type >::value >::type > - : public visitor_result_impl_1::value>::type> + : public visitor_result_impl_1::type> {}; public: // visitation support