diff --git a/sprout/algorithm/fit/bogo_sort.hpp b/sprout/algorithm/fit/bogo_sort.hpp index fcec56d9..f7a609f0 100644 --- a/sprout/algorithm/fit/bogo_sort.hpp +++ b/sprout/algorithm/fit/bogo_sort.hpp @@ -27,7 +27,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bogo_sort(cont, sprout::forward(g), comp)), + sprout::get_internal(sprout::fixed::bogo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp)), offset, offset + sprout::size(cont) ); @@ -40,7 +40,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fit::detail::bogo_sort_impl( - cont, sprout::forward(g), comp, + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, sprout::internal_begin_offset(cont) ); } @@ -54,7 +54,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bogo_sort(cont, sprout::forward(g))), + sprout::get_internal(sprout::fixed::bogo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), offset, offset + sprout::size(cont) ); @@ -67,7 +67,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::bogo_sort_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/bogo_sort_result.hpp b/sprout/algorithm/fit/bogo_sort_result.hpp index 13541760..54a19b6c 100644 --- a/sprout/algorithm/fit/bogo_sort_result.hpp +++ b/sprout/algorithm/fit/bogo_sort_result.hpp @@ -56,7 +56,7 @@ namespace sprout { ) { return sprout::fit::detail::bogo_sort_result_impl_1( - sprout::fixed::bogo_sort_result(cont, sprout::forward(g), comp), + sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp), offset ); } @@ -70,7 +70,7 @@ namespace sprout { typename std::decay::type > bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fit::detail::bogo_sort_result_impl( - cont, sprout::forward(g), comp, + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, sprout::internal_begin_offset(cont) ); } @@ -87,7 +87,7 @@ namespace sprout { ) { return sprout::fit::detail::bogo_sort_result_impl_1( - sprout::fixed::bogo_sort_result(cont, sprout::forward(g)), + sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), offset ); } @@ -102,7 +102,7 @@ namespace sprout { > bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::bogo_sort_result_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/bozo_sort.hpp b/sprout/algorithm/fit/bozo_sort.hpp index 952cf98b..efbb1cc8 100644 --- a/sprout/algorithm/fit/bozo_sort.hpp +++ b/sprout/algorithm/fit/bozo_sort.hpp @@ -27,7 +27,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bozo_sort(cont, sprout::forward(g), comp)), + sprout::get_internal(sprout::fixed::bozo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp)), offset, offset + sprout::size(cont) ); @@ -40,7 +40,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fit::detail::bozo_sort_impl( - cont, sprout::forward(g), comp, + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, sprout::internal_begin_offset(cont) ); } @@ -54,7 +54,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::bozo_sort(cont, sprout::forward(g))), + sprout::get_internal(sprout::fixed::bozo_sort(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), offset, offset + sprout::size(cont) ); @@ -67,7 +67,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::bozo_sort_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/bozo_sort_result.hpp b/sprout/algorithm/fit/bozo_sort_result.hpp index 5823a251..2957beb9 100644 --- a/sprout/algorithm/fit/bozo_sort_result.hpp +++ b/sprout/algorithm/fit/bozo_sort_result.hpp @@ -56,7 +56,7 @@ namespace sprout { ) { return sprout::fit::detail::bozo_sort_result_impl_1( - sprout::fixed::bozo_sort_result(cont, sprout::forward(g), comp), + sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp), offset ); } @@ -71,7 +71,7 @@ namespace sprout { > bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fit::detail::bozo_sort_result_impl( - cont, sprout::forward(g), comp, + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp, sprout::internal_begin_offset(cont) ); } @@ -88,7 +88,7 @@ namespace sprout { ) { return sprout::fit::detail::bozo_sort_result_impl_1( - sprout::fixed::bozo_sort_result(cont, sprout::forward(g)), + sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), offset ); } @@ -103,7 +103,7 @@ namespace sprout { > bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::bozo_sort_result_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/random_swap.hpp b/sprout/algorithm/fit/random_swap.hpp index 43e7dcd1..12ec3536 100644 --- a/sprout/algorithm/fit/random_swap.hpp +++ b/sprout/algorithm/fit/random_swap.hpp @@ -28,7 +28,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::random_swap(cont, sprout::forward(g))), + sprout::get_internal(sprout::fixed::random_swap(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), offset, offset + sprout::size(cont) ); @@ -41,7 +41,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type random_swap(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::random_swap_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/random_swap_result.hpp b/sprout/algorithm/fit/random_swap_result.hpp index 34736157..08922ade 100644 --- a/sprout/algorithm/fit/random_swap_result.hpp +++ b/sprout/algorithm/fit/random_swap_result.hpp @@ -56,7 +56,7 @@ namespace sprout { ) { return sprout::fit::detail::random_swap_result_impl_1( - sprout::fixed::random_swap_result(cont, sprout::forward(g)), + sprout::fixed::random_swap_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), offset ); } @@ -71,7 +71,7 @@ namespace sprout { > random_swap_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::random_swap_result_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/shuffle.hpp b/sprout/algorithm/fit/shuffle.hpp index 43f1817b..a512768c 100644 --- a/sprout/algorithm/fit/shuffle.hpp +++ b/sprout/algorithm/fit/shuffle.hpp @@ -28,7 +28,7 @@ namespace sprout { ) { return sprout::sub_copy( - sprout::get_internal(sprout::fixed::shuffle(cont, sprout::forward(g))), + sprout::get_internal(sprout::fixed::shuffle(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g))), offset, offset + sprout::size(cont) ); @@ -41,7 +41,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type shuffle(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::shuffle_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fit/shuffle_result.hpp b/sprout/algorithm/fit/shuffle_result.hpp index a7da779b..85690f70 100644 --- a/sprout/algorithm/fit/shuffle_result.hpp +++ b/sprout/algorithm/fit/shuffle_result.hpp @@ -56,7 +56,7 @@ namespace sprout { ) { return sprout::fit::detail::shuffle_result_impl_1( - sprout::fixed::shuffle_result(cont, sprout::forward(g)), + sprout::fixed::shuffle_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), offset ); } @@ -71,7 +71,7 @@ namespace sprout { > shuffle_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fit::detail::shuffle_result_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont) ); } diff --git a/sprout/algorithm/fixed/bogo_sort.hpp b/sprout/algorithm/fixed/bogo_sort.hpp index b1e59767..9f7309ed 100644 --- a/sprout/algorithm/fixed/bogo_sort.hpp +++ b/sprout/algorithm/fixed/bogo_sort.hpp @@ -24,14 +24,14 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::first( - sprout::fixed::bogo_sort_result(cont, sprout::forward(g), comp) + sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp) ); } template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type bogo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::first( - sprout::fixed::bogo_sort_result(cont, sprout::forward(g)) + sprout::fixed::bogo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)) ); } } // namespace fixed diff --git a/sprout/algorithm/fixed/bogo_sort_result.hpp b/sprout/algorithm/fixed/bogo_sort_result.hpp index a243abe0..7da8da5b 100644 --- a/sprout/algorithm/fixed/bogo_sort_result.hpp +++ b/sprout/algorithm/fixed/bogo_sort_result.hpp @@ -68,9 +68,9 @@ namespace sprout { typedef typename sprout::fixed::results::shuffle::type result_type; typedef sprout::pair type; return sprout::is_sorted(sprout::begin(cont), sprout::end(cont), comp) - ? result_type(sprout::deep_copy(cont), sprout::forward(g)) + ? result_type(sprout::deep_copy(cont), SPROUT_FORWARD(UniformRandomNumberGenerator, g)) : sprout::fixed::detail::bogo_sort_result_impl( - type(sprout::fixed::shuffle_result(cont, sprout::forward(g)), false), + type(sprout::fixed::shuffle_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), false), comp, static_cast::difference_type>(1) ).first ; @@ -84,7 +84,7 @@ namespace sprout { bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fixed::detail::bogo_sort_result( cont, - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp ); } @@ -93,7 +93,7 @@ namespace sprout { bogo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::bogo_sort_result( cont, - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, g), NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() ); } diff --git a/sprout/algorithm/fixed/bozo_sort.hpp b/sprout/algorithm/fixed/bozo_sort.hpp index 17e9aebf..d886acce 100644 --- a/sprout/algorithm/fixed/bozo_sort.hpp +++ b/sprout/algorithm/fixed/bozo_sort.hpp @@ -24,14 +24,14 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::first( - sprout::fixed::bozo_sort_result(cont, sprout::forward(g), comp) + sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp) ); } template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type bozo_sort(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::first( - sprout::fixed::bozo_sort_result(cont, sprout::forward(g)) + sprout::fixed::bozo_sort_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)) ); } } // namespace fixed diff --git a/sprout/algorithm/fixed/bozo_sort_result.hpp b/sprout/algorithm/fixed/bozo_sort_result.hpp index 5ec919b8..cfcf31ea 100644 --- a/sprout/algorithm/fixed/bozo_sort_result.hpp +++ b/sprout/algorithm/fixed/bozo_sort_result.hpp @@ -68,9 +68,9 @@ namespace sprout { typedef typename sprout::fixed::results::shuffle::type result_type; typedef sprout::pair type; return sprout::is_sorted(sprout::begin(cont), sprout::end(cont), comp) - ? result_type(sprout::deep_copy(cont), sprout::forward(g)) + ? result_type(sprout::deep_copy(cont), SPROUT_FORWARD(UniformRandomNumberGenerator, g)) : sprout::fixed::detail::bozo_sort_result_impl( - type(sprout::fixed::random_swap_result(cont, sprout::forward(g)), false), + type(sprout::fixed::random_swap_result(cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g)), false), comp, static_cast::difference_type>(1) ).first ; @@ -84,7 +84,7 @@ namespace sprout { bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g, Compare comp) { return sprout::fixed::detail::bozo_sort_result( cont, - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, g), comp ); } @@ -93,7 +93,7 @@ namespace sprout { bozo_sort_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::bozo_sort_result( cont, - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, g), NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() ); } diff --git a/sprout/algorithm/fixed/random_swap.hpp b/sprout/algorithm/fixed/random_swap.hpp index 4fdb02e9..8990df79 100644 --- a/sprout/algorithm/fixed/random_swap.hpp +++ b/sprout/algorithm/fixed/random_swap.hpp @@ -43,7 +43,7 @@ namespace sprout { return n > 1 ? sprout::fixed::detail::make_random_swap_indexes_1( SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ) : sprout::array{{}} @@ -72,7 +72,7 @@ namespace sprout { cont, sprout::fixed::detail::make_random_swap_indexes( size, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ); } @@ -84,7 +84,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type random_swap(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::random_swap_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::size(cont) ); } diff --git a/sprout/algorithm/fixed/random_swap_result.hpp b/sprout/algorithm/fixed/random_swap_result.hpp index 37888822..c210b2bb 100644 --- a/sprout/algorithm/fixed/random_swap_result.hpp +++ b/sprout/algorithm/fixed/random_swap_result.hpp @@ -52,12 +52,12 @@ namespace sprout { return n > 1 ? sprout::fixed::detail::make_random_swap_result_indexes_1( SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ) : result_type( sprout::array{{}}, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ; } @@ -88,7 +88,7 @@ namespace sprout { cont, sprout::fixed::detail::make_random_swap_result_indexes( size, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ); } @@ -100,7 +100,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::fixed::results::shuffle::type random_swap_result(Container const& cont, UniformRandomNumberGenerator&& g) { return sprout::fixed::detail::random_swap_result_impl( - cont, sprout::forward(g), + cont, SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::size(cont) ); } diff --git a/sprout/algorithm/fixed/shuffle.hpp b/sprout/algorithm/fixed/shuffle.hpp index a75c2a80..5a3fa8e7 100644 --- a/sprout/algorithm/fixed/shuffle.hpp +++ b/sprout/algorithm/fixed/shuffle.hpp @@ -47,7 +47,7 @@ namespace sprout { ? sprout::fixed::detail::make_shuffle_indexes_1( n, SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ), sprout::fixed::iota(sprout::pit >(), 0), 0 @@ -89,7 +89,7 @@ namespace sprout { indexes, sprout::fixed::detail::make_shuffle_indexes::static_size>( size, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ), offset, size @@ -105,7 +105,7 @@ namespace sprout { return sprout::fixed::detail::shuffle_impl( cont, sprout::container_indexes::make(), - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, 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 4ded7fde..5200e55c 100644 --- a/sprout/algorithm/fixed/shuffle_result.hpp +++ b/sprout/algorithm/fixed/shuffle_result.hpp @@ -55,14 +55,14 @@ namespace sprout { ? sprout::fixed::detail::make_shuffle_result_indexes_1( n, SPROUT_WORKAROUND_DETAIL_UNIFORM_INT_DISTRIBUTION(0, n - 1)( - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ), sprout::fixed::iota(sprout::pit >(), 0), 0 ) : result_type( sprout::array{{}}, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ) ; } @@ -104,7 +104,7 @@ namespace sprout { indexes, sprout::fixed::detail::make_shuffle_result_indexes::static_size>( size, - sprout::forward(g) + SPROUT_FORWARD(UniformRandomNumberGenerator, g) ), offset, size @@ -120,7 +120,7 @@ namespace sprout { return sprout::fixed::detail::shuffle_result_impl( cont, sprout::container_indexes::make(), - sprout::forward(g), + SPROUT_FORWARD(UniformRandomNumberGenerator, g), sprout::internal_begin_offset(cont), sprout::size(cont) ); diff --git a/sprout/array/make_array.hpp b/sprout/array/make_array.hpp index 48355426..987362b2 100644 --- a/sprout/array/make_array.hpp +++ b/sprout/array/make_array.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::array::type, sizeof...(Types)> make_array(Types&&... args) { - return sprout::array::type, sizeof...(Types)>{{T(sprout::forward(args))...}}; + return sprout::array::type, sizeof...(Types)>{{T(SPROUT_FORWARD(Types, args))...}}; } // !!! OLD: // template @@ -33,7 +33,7 @@ namespace sprout { // typename sprout::common_decay::type, // sizeof...(Types) // > type; -// return type{{typename sprout::common_decay::type(sprout::forward(args))...}}; +// return type{{typename sprout::common_decay::type(SPROUT_FORWARD(Types, args))...}}; // } // @@ -46,7 +46,7 @@ namespace sprout { typename sprout::common_decay::type, sizeof...(Types) > type; - return type{{typename sprout::common_decay::type(sprout::forward(args))...}}; + return type{{typename sprout::common_decay::type(SPROUT_FORWARD(Types, args))...}}; } // @@ -57,7 +57,7 @@ namespace sprout { SPROUT_DEPRECATED inline SPROUT_CONSTEXPR sprout::array convert_array(Converter&& conv, Types&&... args) { - return sprout::make_array(sprout::forward(conv)(sprout::forward(args))...); + return sprout::make_array(SPROUT_FORWARD(Converter, conv)(SPROUT_FORWARD(Types, args))...); } } // namespace sprout diff --git a/sprout/bitset/bitset.hpp b/sprout/bitset/bitset.hpp index b45a36ba..7c1f062e 100644 --- a/sprout/bitset/bitset.hpp +++ b/sprout/bitset/bitset.hpp @@ -878,7 +878,7 @@ namespace sprout { public: template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::forward(cont); + return SPROUT_FORWARD(Cont, cont); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { diff --git a/sprout/compost/effects/auto_pan.hpp b/sprout/compost/effects/auto_pan.hpp index 352cee3a..77b576d7 100644 --- a/sprout/compost/effects/auto_pan.hpp +++ b/sprout/compost/effects/auto_pan.hpp @@ -128,13 +128,13 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::auto_pan_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) ) | sprout::compost::formats::stereo( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) @@ -142,13 +142,13 @@ namespace sprout { ) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) ) | sprout::compost::formats::stereo( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::auto_pan_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) diff --git a/sprout/compost/effects/changed_volume.hpp b/sprout/compost/effects/changed_volume.hpp index 3aaf212c..95867d0a 100644 --- a/sprout/compost/effects/changed_volume.hpp +++ b/sprout/compost/effects/changed_volume.hpp @@ -63,11 +63,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::change_volume_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::bind2nd(sprout::multiplies<>(), rhs.value())) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::bind2nd(sprout::multiplies<>(), rhs.value())) ; } diff --git a/sprout/compost/effects/chorus.hpp b/sprout/compost/effects/chorus.hpp index eaa3d3f6..ed5108da 100644 --- a/sprout/compost/effects/chorus.hpp +++ b/sprout/compost/effects/chorus.hpp @@ -136,8 +136,8 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::chorus_holder const& rhs) -> decltype( - sprout::forward(lhs) - | sprout::adaptors::valued(sprout::size(sprout::forward(lhs))) + SPROUT_FORWARD(Range, lhs) + | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::chorus_outdirected_value( @@ -146,8 +146,8 @@ namespace sprout { ) ) { - return sprout::forward(lhs) - | sprout::adaptors::valued(sprout::size(sprout::forward(lhs))) + return SPROUT_FORWARD(Range, lhs) + | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::chorus_outdirected_value( diff --git a/sprout/compost/effects/clipped.hpp b/sprout/compost/effects/clipped.hpp index b8fdd8c8..2802b71c 100644 --- a/sprout/compost/effects/clipped.hpp +++ b/sprout/compost/effects/clipped.hpp @@ -65,11 +65,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::clip_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::clamped(rhs.lower(), rhs.upper()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::clamped(rhs.lower(), rhs.upper()) ; } @@ -77,11 +77,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::clipped_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::clamped(-1., 1.) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::clamped(-1., 1.) ; } diff --git a/sprout/compost/effects/compressed.hpp b/sprout/compost/effects/compressed.hpp index 3637b796..f7c8e323 100644 --- a/sprout/compost/effects/compressed.hpp +++ b/sprout/compost/effects/compressed.hpp @@ -118,11 +118,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::compress_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::compress_value(rhs.threshold(), rhs.ratio())) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::compress_value(rhs.threshold(), rhs.ratio())) ; } diff --git a/sprout/compost/effects/distorted.hpp b/sprout/compost/effects/distorted.hpp index bef4c715..b4b07774 100644 --- a/sprout/compost/effects/distorted.hpp +++ b/sprout/compost/effects/distorted.hpp @@ -66,13 +66,13 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::distort_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::changed_volume(rhs.gain()) | sprout::compost::effects::clipped() | sprout::compost::effects::changed_volume(rhs.level()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::changed_volume(rhs.gain()) | sprout::compost::effects::clipped() | sprout::compost::effects::changed_volume(rhs.level()) diff --git a/sprout/compost/effects/fuzzed.hpp b/sprout/compost/effects/fuzzed.hpp index fa88ed8e..a99cee46 100644 --- a/sprout/compost/effects/fuzzed.hpp +++ b/sprout/compost/effects/fuzzed.hpp @@ -67,12 +67,12 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::fuzz_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::rectified | sprout::compost::effects::distorted(rhs.gain(), rhs.level()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::rectified | sprout::compost::effects::distorted(rhs.gain(), rhs.level()) ; diff --git a/sprout/compost/effects/noise_gated.hpp b/sprout/compost/effects/noise_gated.hpp index dcbbbbd3..ea965d82 100644 --- a/sprout/compost/effects/noise_gated.hpp +++ b/sprout/compost/effects/noise_gated.hpp @@ -108,11 +108,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::noise_gate_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::noise_gate_value(rhs.threshold())) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::noise_gate_value(rhs.threshold())) ; } diff --git a/sprout/compost/effects/overdriven.hpp b/sprout/compost/effects/overdriven.hpp index fb19a54d..786b4751 100644 --- a/sprout/compost/effects/overdriven.hpp +++ b/sprout/compost/effects/overdriven.hpp @@ -94,13 +94,13 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::overdrive_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::changed_volume(rhs.gain()) | sprout::adaptors::transformed(sprout::compost::overdrive_clip_value<>()) | sprout::compost::effects::changed_volume(rhs.level()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::compost::effects::changed_volume(rhs.gain()) | sprout::adaptors::transformed(sprout::compost::overdrive_clip_value<>()) | sprout::compost::effects::changed_volume(rhs.level()) diff --git a/sprout/compost/effects/rectified.hpp b/sprout/compost/effects/rectified.hpp index fefafb32..4b7d86ce 100644 --- a/sprout/compost/effects/rectified.hpp +++ b/sprout/compost/effects/rectified.hpp @@ -58,11 +58,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::rectified_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::rectify_value<>()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::rectify_value<>()) ; } diff --git a/sprout/compost/effects/reverbed.hpp b/sprout/compost/effects/reverbed.hpp index 265231a4..cd1f3d15 100644 --- a/sprout/compost/effects/reverbed.hpp +++ b/sprout/compost/effects/reverbed.hpp @@ -131,7 +131,7 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::reverb_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::reverb_outdirected_value( @@ -140,7 +140,7 @@ namespace sprout { ) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::reverb_outdirected_value( diff --git a/sprout/compost/effects/superposed.hpp b/sprout/compost/effects/superposed.hpp index 926d0275..be0e4825 100644 --- a/sprout/compost/effects/superposed.hpp +++ b/sprout/compost/effects/superposed.hpp @@ -71,11 +71,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::superpose_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(rhs.range(), sprout::plus<>()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(rhs.range(), sprout::plus<>()) ; } diff --git a/sprout/compost/effects/tremolo.hpp b/sprout/compost/effects/tremolo.hpp index 37532978..5c6aea14 100644 --- a/sprout/compost/effects/tremolo.hpp +++ b/sprout/compost/effects/tremolo.hpp @@ -103,14 +103,14 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::tremolo_holder const& rhs) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::tremolo_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) ) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::tremolo_outdirected_value(rhs.depth(), rhs.rate(), rhs.samples_per_sec()) diff --git a/sprout/compost/effects/vibrato.hpp b/sprout/compost/effects/vibrato.hpp index ecad522b..f21bac7f 100644 --- a/sprout/compost/effects/vibrato.hpp +++ b/sprout/compost/effects/vibrato.hpp @@ -135,8 +135,8 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::effects::vibrato_holder const& rhs) -> decltype( - sprout::forward(lhs) - | sprout::adaptors::valued(sprout::size(sprout::forward(lhs))) + SPROUT_FORWARD(Range, lhs) + | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::vibrato_outdirected_value( @@ -145,8 +145,8 @@ namespace sprout { ) ) { - return sprout::forward(lhs) - | sprout::adaptors::valued(sprout::size(sprout::forward(lhs))) + return SPROUT_FORWARD(Range, lhs) + | sprout::adaptors::valued(sprout::size(SPROUT_FORWARD(Range, lhs))) | sprout::adaptors::indexed | sprout::adaptors::outdirected | sprout::adaptors::transformed( sprout::compost::vibrato_outdirected_value( diff --git a/sprout/compost/formats/as_complex.hpp b/sprout/compost/formats/as_complex.hpp index d3d0d5bc..97279d61 100644 --- a/sprout/compost/formats/as_complex.hpp +++ b/sprout/compost/formats/as_complex.hpp @@ -46,11 +46,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::formats::as_complex_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_complex_value()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_complex_value()) ; } diff --git a/sprout/compost/formats/as_imag.hpp b/sprout/compost/formats/as_imag.hpp index a4ea6012..6038595f 100644 --- a/sprout/compost/formats/as_imag.hpp +++ b/sprout/compost/formats/as_imag.hpp @@ -47,11 +47,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::formats::as_imag_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_imag_value()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_imag_value()) ; } diff --git a/sprout/compost/formats/as_pcm_wave.hpp b/sprout/compost/formats/as_pcm_wave.hpp index 5223993b..0f11219f 100644 --- a/sprout/compost/formats/as_pcm_wave.hpp +++ b/sprout/compost/formats/as_pcm_wave.hpp @@ -81,11 +81,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::formats::as_pcm_wave_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::normalized_to_pcm_wave()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::normalized_to_pcm_wave()) ; } diff --git a/sprout/compost/formats/as_real.hpp b/sprout/compost/formats/as_real.hpp index 7a021816..367536bb 100644 --- a/sprout/compost/formats/as_real.hpp +++ b/sprout/compost/formats/as_real.hpp @@ -47,11 +47,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, sprout::compost::formats::as_real_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_real_value()) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::transformed(sprout::compost::to_real_value()) ; } diff --git a/sprout/compost/formats/left_channel.hpp b/sprout/compost/formats/left_channel.hpp index f253219d..4ef17850 100644 --- a/sprout/compost/formats/left_channel.hpp +++ b/sprout/compost/formats/left_channel.hpp @@ -34,11 +34,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, left_channel_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::steps(2) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::steps(2) ; } diff --git a/sprout/compost/formats/right_channel.hpp b/sprout/compost/formats/right_channel.hpp index 8fd37021..9347a7c8 100644 --- a/sprout/compost/formats/right_channel.hpp +++ b/sprout/compost/formats/right_channel.hpp @@ -34,11 +34,11 @@ namespace sprout { inline SPROUT_CONSTEXPR auto operator|(Range&& lhs, right_channel_forwarder const&) -> decltype( - sprout::forward(lhs) + SPROUT_FORWARD(Range, lhs) | sprout::adaptors::steps(2, 1) ) { - return sprout::forward(lhs) + return SPROUT_FORWARD(Range, lhs) | sprout::adaptors::steps(2, 1) ; } diff --git a/sprout/container/container_construct_traits.hpp b/sprout/container/container_construct_traits.hpp index 72359997..ddd931b0 100644 --- a/sprout/container/container_construct_traits.hpp +++ b/sprout/container/container_construct_traits.hpp @@ -37,7 +37,7 @@ namespace sprout { >::type default_make_container(Args&&... args) { typedef typename sprout::container_construct_traits::copied_type copied_type; - return copied_type{{sprout::forward(args)...}}; + return copied_type{{SPROUT_FORWARD(Args, args)...}}; } template inline SPROUT_CONSTEXPR typename std::enable_if< @@ -46,7 +46,7 @@ namespace sprout { >::type default_make_container(Args&&... args) { typedef typename sprout::container_construct_traits::copied_type copied_type; - return copied_type{sprout::forward(args)...}; + return copied_type{SPROUT_FORWARD(Args, args)...}; } template @@ -55,7 +55,7 @@ namespace sprout { typename sprout::container_construct_traits::copied_type >::type default_remake_container(Cont&&, typename sprout::container_traits::difference_type, Args&&... args) { - return sprout::container_construct_traits::make(sprout::forward(args)...); + return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); } template inline SPROUT_CONSTEXPR typename std::enable_if< @@ -65,7 +65,7 @@ namespace sprout { typename sprout::container_construct_traits::copied_type >::type default_remake_container(Cont&&, typename sprout::container_traits::difference_type, Args&&... args) { - return sprout::container_construct_traits::make(sprout::forward(args)...); + return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); } template inline SPROUT_CONSTEXPR typename std::enable_if< @@ -96,19 +96,19 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::forward(cont); + return SPROUT_FORWARD(Cont, cont); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::detail::default_make_container(sprout::forward(args)...); + return sprout::detail::default_make_container(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { return sprout::detail::default_remake_container( - sprout::forward(cont), size, - sprout::forward(args)... + SPROUT_FORWARD(Cont, cont), size, + SPROUT_FORWARD(Args, args)... ); } }; diff --git a/sprout/container/container_fitness_traits.hpp b/sprout/container/container_fitness_traits.hpp index 0c150a3d..1054fbb7 100644 --- a/sprout/container/container_fitness_traits.hpp +++ b/sprout/container/container_fitness_traits.hpp @@ -24,7 +24,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return NS_SSCRISK_CEL_OR_SPROUT::min(size, sprout::size(sprout::forward(cont))); + return NS_SSCRISK_CEL_OR_SPROUT::min(size, sprout::size(SPROUT_FORWARD(Cont, cont))); } }; template diff --git a/sprout/container/container_holder.hpp b/sprout/container/container_holder.hpp index 4b7bce9c..57cf4b10 100644 --- a/sprout/container/container_holder.hpp +++ b/sprout/container/container_holder.hpp @@ -143,17 +143,17 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(sprout::forward(cont))); + return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { - return sprout::remake(sprout::get_internal(sprout::forward(cont)), size, sprout::forward(args)...); + return sprout::remake(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), size, SPROUT_FORWARD(Args, args)...); } }; @@ -181,7 +181,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename internal::type get_internal(Cont&& cont) { - return call(sprout::forward(cont)); + return call(SPROUT_FORWARD(Cont, cont)); } }; } // namespace sprout diff --git a/sprout/container/deep_copy.hpp b/sprout/container/deep_copy.hpp index 048ed707..8a74b06a 100644 --- a/sprout/container/deep_copy.hpp +++ b/sprout/container/deep_copy.hpp @@ -23,7 +23,7 @@ namespace sprout { >::copied_type deep_copy(Container&& cont) { typedef typename std::remove_reference::type container_type; - return sprout::container_construct_traits::deep_copy(sprout::forward(cont)); + return sprout::container_construct_traits::deep_copy(SPROUT_FORWARD(Container, cont)); } } // namespace sprout diff --git a/sprout/container/fit_size.hpp b/sprout/container/fit_size.hpp index 7ea8d14f..26fbfa2a 100644 --- a/sprout/container/fit_size.hpp +++ b/sprout/container/fit_size.hpp @@ -22,7 +22,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::container_traits::type>::difference_type fit_size(Container&& cont, typename sprout::container_traits::type>::difference_type size) { typedef typename std::remove_reference::type container_type; - return sprout::container_fitness_traits::fit_size(sprout::forward(cont), size); + return sprout::container_fitness_traits::fit_size(SPROUT_FORWARD(Container, cont), size); } } // namespace sprout diff --git a/sprout/container/get_deep_internal.hpp b/sprout/container/get_deep_internal.hpp index 626ff6d3..8880e48c 100644 --- a/sprout/container/get_deep_internal.hpp +++ b/sprout/container/get_deep_internal.hpp @@ -24,7 +24,7 @@ namespace sprout { > inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type get_deep_internal_impl(Container&& cont) { - return sprout::forward(cont); + return SPROUT_FORWARD(Container, cont); } template< typename Container, @@ -33,7 +33,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type get_deep_internal_impl(Container&& cont) { return sprout::detail::get_deep_internal_impl( - sprout::get_internal(sprout::forward(cont)) + sprout::get_internal(SPROUT_FORWARD(Container, cont)) ); } } // namespace detail @@ -43,7 +43,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::containers::deep_internal::type get_deep_internal(Container&& cont) { - return sprout::detail::get_deep_internal_impl(sprout::forward(cont)); + return sprout::detail::get_deep_internal_impl(SPROUT_FORWARD(Container, cont)); } } // namespace sprout diff --git a/sprout/container/get_internal.hpp b/sprout/container/get_internal.hpp index dea4620f..21c397c6 100644 --- a/sprout/container/get_internal.hpp +++ b/sprout/container/get_internal.hpp @@ -22,7 +22,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::containers::internal::type get_internal(Container&& cont) { typedef typename std::remove_reference::type container_type; - return sprout::sub_container_traits::get_internal(sprout::forward(cont)); + return sprout::sub_container_traits::get_internal(SPROUT_FORWARD(Container, cont)); } } // namespace sprout diff --git a/sprout/container/internal_deep_copy.hpp b/sprout/container/internal_deep_copy.hpp index b15d305d..7ba79d9d 100644 --- a/sprout/container/internal_deep_copy.hpp +++ b/sprout/container/internal_deep_copy.hpp @@ -29,7 +29,7 @@ namespace sprout { >::copied_type internal_deep_copy(Container&& cont) { return sprout::deep_copy( - sprout::get_deep_internal(sprout::forward(cont)) + sprout::get_deep_internal(SPROUT_FORWARD(Container, cont)) ); } } // namespace sprout diff --git a/sprout/container/make.hpp b/sprout/container/make.hpp index 03cb1037..4bd01377 100644 --- a/sprout/container/make.hpp +++ b/sprout/container/make.hpp @@ -19,7 +19,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_construct_traits::copied_type make(Args&&... args) { - return sprout::container_construct_traits::make(sprout::forward(args)...); + return sprout::container_construct_traits::make(SPROUT_FORWARD(Args, args)...); } } // namespace sprout diff --git a/sprout/container/remake.hpp b/sprout/container/remake.hpp index 530a3ab5..f2b984f5 100644 --- a/sprout/container/remake.hpp +++ b/sprout/container/remake.hpp @@ -22,9 +22,9 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::container_construct_traits::copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args) { return sprout::container_construct_traits::remake( - sprout::forward(cont), + SPROUT_FORWARD(Cont, cont), size, - sprout::forward(args)... + SPROUT_FORWARD(Args, args)... ); } } // namespace sprout diff --git a/sprout/container/sub_container_traits.hpp b/sprout/container/sub_container_traits.hpp index d75f88a4..8dff8671 100644 --- a/sprout/container/sub_container_traits.hpp +++ b/sprout/container/sub_container_traits.hpp @@ -27,7 +27,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename internal::type get_internal(Cont&& cont) { - return sprout::forward(cont); + return SPROUT_FORWARD(Cont, cont); } }; template diff --git a/sprout/ctype/functor.hpp b/sprout/ctype/functor.hpp index e26191b3..d1f37b70 100644 --- a/sprout/ctype/functor.hpp +++ b/sprout/ctype/functor.hpp @@ -433,7 +433,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tolower(std::declval()) == sprout::tolower(std::declval()))) { - return sprout::tolower(sprout::forward(x)) == sprout::tolower(sprout::forward(y)); + return sprout::tolower(SPROUT_FORWARD(T, x)) == sprout::tolower(SPROUT_FORWARD(U, y)); } }; @@ -459,7 +459,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tolower(std::declval()) != sprout::tolower(std::declval()))) { - return sprout::tolower(sprout::forward(x)) != sprout::tolower(sprout::forward(y)); + return sprout::tolower(SPROUT_FORWARD(T, x)) != sprout::tolower(SPROUT_FORWARD(U, y)); } }; } // namespace ctypes diff --git a/sprout/darkroom/access/access.hpp b/sprout/darkroom/access/access.hpp index 53b3dde2..cc9d0946 100644 --- a/sprout/darkroom/access/access.hpp +++ b/sprout/darkroom/access/access.hpp @@ -44,10 +44,10 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto get(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get(sprout::forward(t)))) - -> decltype(sprout::tuples::get(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::tuples::get(SPROUT_FORWARD(T, t))) { - return sprout::tuples::get(sprout::forward(t)); + return sprout::tuples::get(SPROUT_FORWARD(T, t)); } } // namespace access } // namespace darkroom diff --git a/sprout/darkroom/colors/rgb.hpp b/sprout/darkroom/colors/rgb.hpp index 43d8f1cd..72ce7e4b 100644 --- a/sprout/darkroom/colors/rgb.hpp +++ b/sprout/darkroom/colors/rgb.hpp @@ -38,26 +38,26 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto r(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<0>(sprout::forward(t)); + return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto g(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<1>(sprout::forward(t)); + return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto b(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<2>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<2>(sprout::forward(t)); + return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); } // // a @@ -68,10 +68,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto a(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<3>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<3>(sprout::forward(t)); + return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); } template< typename T, diff --git a/sprout/darkroom/coords/vector.hpp b/sprout/darkroom/coords/vector.hpp index a1a63cf4..722efb5e 100644 --- a/sprout/darkroom/coords/vector.hpp +++ b/sprout/darkroom/coords/vector.hpp @@ -26,26 +26,26 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto x(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<0>(sprout::forward(t)); + return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto y(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<1>(sprout::forward(t)); + return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto z(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<2>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<2>(sprout::forward(t)); + return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); } // diff --git a/sprout/darkroom/intersects/intersection.hpp b/sprout/darkroom/intersects/intersection.hpp index 4ffcb5b3..30d8ef29 100644 --- a/sprout/darkroom/intersects/intersection.hpp +++ b/sprout/darkroom/intersects/intersection.hpp @@ -51,42 +51,42 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto does_intersect(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<0>(sprout::forward(t)); + return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto distance(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<1>(sprout::forward(t)); + return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto point_of_intersection(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<2>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<2>(sprout::forward(t)); + return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto normal(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<3>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<3>(sprout::forward(t)); + return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto material(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<4>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<4>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<4>(sprout::forward(t)); + return sprout::darkroom::access::get<4>(SPROUT_FORWARD(T, t)); } template< typename T, @@ -94,10 +94,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto is_from_inside(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<5>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<5>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<5>(sprout::forward(t)); + return sprout::darkroom::access::get<5>(SPROUT_FORWARD(T, t)); } template< typename T, diff --git a/sprout/darkroom/lights/light_list.hpp b/sprout/darkroom/lights/light_list.hpp index 87d567df..31299a30 100644 --- a/sprout/darkroom/lights/light_list.hpp +++ b/sprout/darkroom/lights/light_list.hpp @@ -21,9 +21,9 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto make_light_list(Lights&&... lights) - -> decltype(sprout::make_tuple(sprout::forward(lights)...)) + -> decltype(sprout::make_tuple(SPROUT_FORWARD(Lights, lights)...)) { - return sprout::make_tuple(sprout::forward(lights)...); + return sprout::make_tuple(SPROUT_FORWARD(Lights, lights)...); } } // namespace lights } // namespace darkroom diff --git a/sprout/darkroom/materials/material.hpp b/sprout/darkroom/materials/material.hpp index af3ac428..afda503a 100644 --- a/sprout/darkroom/materials/material.hpp +++ b/sprout/darkroom/materials/material.hpp @@ -58,10 +58,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto color(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<0>(sprout::forward(t)); + return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); } template< typename T, @@ -82,10 +82,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto reflection(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<1>(sprout::forward(t)); + return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); } template< typename T, @@ -106,10 +106,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto alpha(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<2>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<2>(sprout::forward(t)); + return sprout::darkroom::access::get<2>(SPROUT_FORWARD(T, t)); } template< typename T, @@ -130,10 +130,10 @@ namespace sprout { > inline SPROUT_CONSTEXPR auto refraction(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<3>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<3>(sprout::forward(t)); + return sprout::darkroom::access::get<3>(SPROUT_FORWARD(T, t)); } template< typename T, diff --git a/sprout/darkroom/objects/object_list.hpp b/sprout/darkroom/objects/object_list.hpp index bf8a66eb..18c2a2a5 100644 --- a/sprout/darkroom/objects/object_list.hpp +++ b/sprout/darkroom/objects/object_list.hpp @@ -21,9 +21,9 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto make_object_list(Objects&&... objs) - -> decltype(sprout::make_tuple(sprout::forward(objs)...)) + -> decltype(sprout::make_tuple(SPROUT_FORWARD(Objects, objs)...)) { - return sprout::make_tuple(sprout::forward(objs)...); + return sprout::make_tuple(SPROUT_FORWARD(Objects, objs)...); } } // namespace objects } // namespace darkroom diff --git a/sprout/darkroom/rays/ray.hpp b/sprout/darkroom/rays/ray.hpp index 41e9c5b3..cd638e2b 100644 --- a/sprout/darkroom/rays/ray.hpp +++ b/sprout/darkroom/rays/ray.hpp @@ -25,18 +25,18 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto position(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<0>(sprout::forward(t)); + return sprout::darkroom::access::get<0>(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR auto direction(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward(t)))) - -> decltype(sprout::darkroom::access::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::darkroom::access::get<1>(sprout::forward(t)); + return sprout::darkroom::access::get<1>(SPROUT_FORWARD(T, t)); } // diff --git a/sprout/functional/address_of.hpp b/sprout/functional/address_of.hpp index 8e592aa1..9f6ed682 100644 --- a/sprout/functional/address_of.hpp +++ b/sprout/functional/address_of.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(&std::declval())) { - return &sprout::forward(x); + return &SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/assign.hpp b/sprout/functional/assign.hpp index ecebe56c..020ac8c1 100644 --- a/sprout/functional/assign.hpp +++ b/sprout/functional/assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() = std::declval())) { - return sprout::forward(x) = sprout::forward(y); + return SPROUT_FORWARD(T, x) = SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bind/bind.hpp b/sprout/functional/bind/bind.hpp index 2ac995f8..2421067a 100644 --- a/sprout/functional/bind/bind.hpp +++ b/sprout/functional/bind/bind.hpp @@ -107,7 +107,7 @@ namespace sprout { ) const volatile -> decltype(arg(std::declval()...)) { - return arg(sprout::forward(sprout::tuples::get(tuple))...); + return arg(SPROUT_FORWARD(Args, sprout::tuples::get(tuple))...); } public: template @@ -136,9 +136,8 @@ namespace sprout { template typename result::type SPROUT_CONSTEXPR operator()(Arg /*const volatile&*/, Tuple& tuple) const volatile { - return sprout::forward::type>( - sprout::tuples::get<(sprout::is_placeholder::value - 1)>(tuple) - ); + typedef typename result::type type; + return SPROUT_FORWARD(type, sprout::tuples::get<(sprout::is_placeholder::value - 1)>(tuple)); } }; template @@ -154,7 +153,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR CVArg&& operator()(CVArg&& arg, Tuple&) const volatile { - return sprout::forward(arg); + return SPROUT_FORWARD(CVArg, arg); } }; @@ -395,12 +394,12 @@ namespace sprout { -> decltype( sprout::detail::get_bound_helper::get_bound< sprout::detail::bound_position::type, ArgSize>::value - >(sprout::forward(bound_args)) + >(SPROUT_FORWARD(Bounds, bound_args)) ) { return sprout::detail::get_bound_helper::get_bound< sprout::detail::bound_position::type, ArgSize>::value - >(sprout::forward(bound_args)); + >(SPROUT_FORWARD(Bounds, bound_args)); } } // namespace detail @@ -490,7 +489,7 @@ namespace sprout { template explicit SPROUT_CONSTEXPR binder_impl(Functor const& f, Args&&... args) : f_(f) - , bound_args_(sprout::forward(args)...) + , bound_args_(SPROUT_FORWARD(Args, args)...) {} binder_impl(binder_impl const&) = default; }; @@ -510,7 +509,7 @@ namespace sprout { public: template explicit SPROUT_CONSTEXPR binder(Functor const& f, Args&&... args) - : impl_type(f, sprout::forward(args)...) + : impl_type(f, SPROUT_FORWARD(Args, args)...) {} binder(binder const&) = default; template< @@ -521,7 +520,7 @@ namespace sprout { > Result operator()(Args&&... args) { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -533,7 +532,7 @@ namespace sprout { > SPROUT_CONSTEXPR Result operator()(Args&&... args) const { return impl_type::template call_c( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -545,7 +544,7 @@ namespace sprout { > Result operator()(Args&&... args) volatile { return impl_type::template call_v( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -557,7 +556,7 @@ namespace sprout { > SPROUT_CONSTEXPR Result operator()(Args&&... args) const volatile { return impl_type::template call_cv( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -577,7 +576,7 @@ namespace sprout { public: template explicit SPROUT_CONSTEXPR cbinder(Functor const& f, Args&&... args) - : impl_type(f, sprout::forward(args)...) + : impl_type(f, SPROUT_FORWARD(Args, args)...) {} cbinder(cbinder const&) = default; template< @@ -588,7 +587,7 @@ namespace sprout { > SPROUT_CONSTEXPR Result operator()(Args&&... args) const { return impl_type::template call_c( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -600,7 +599,7 @@ namespace sprout { > SPROUT_CONSTEXPR Result operator()(Args&&... args) const volatile { return impl_type::template call_cv( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -704,7 +703,7 @@ namespace sprout { template explicit SPROUT_CONSTEXPR res_binder_impl(Functor const& f, Args&&... args) : f_(f) - , bound_args_(sprout::forward(args)...) + , bound_args_(SPROUT_FORWARD(Args, args)...) {} res_binder_impl(res_binder_impl const&) = default; }; @@ -726,34 +725,34 @@ namespace sprout { public: template explicit res_binder(Functor const& f, Args&&... args) - : impl_type(f, sprout::forward(args)...) + : impl_type(f, SPROUT_FORWARD(Args, args)...) {} res_binder(res_binder const&) = default; template result_type operator()(Args&&... args) { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } template SPROUT_CONSTEXPR result_type operator()(Args&&... args) const { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } template result_type operator()(Args&&... args) volatile { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } template SPROUT_CONSTEXPR result_type operator()(Args&&... args) const volatile { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -775,20 +774,20 @@ namespace sprout { public: template explicit SPROUT_CONSTEXPR res_cbinder(Functor const& f, Args&&... args) - : impl_type(f, sprout::forward(args)...) + : impl_type(f, SPROUT_FORWARD(Args, args)...) {} res_cbinder(res_cbinder const&) = default; template SPROUT_CONSTEXPR result_type operator()(Args&&... args) const { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } template SPROUT_CONSTEXPR result_type operator()(Args&&... args) const volatile { return impl_type::template call( - sprout::tuples::forward_as_tuple(sprout::forward(args)...), + sprout::tuples::forward_as_tuple(SPROUT_FORWARD(Args, args)...), sprout::detail::bound_indexes::make() ); } @@ -999,7 +998,7 @@ namespace sprout { typedef sprout::detail::bind_helper helper_type; typedef typename helper_type::maybe_type maybe_type; typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(sprout::forward(f)), sprout::forward(args)...); + return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); } template inline SPROUT_CONSTEXPR typename sprout::res_bind_result::type @@ -1007,7 +1006,7 @@ namespace sprout { typedef sprout::detail::res_bind_helper helper_type; typedef typename helper_type::maybe_type maybe_type; typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(sprout::forward(f)), sprout::forward(args)...); + return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); } // @@ -1019,7 +1018,7 @@ namespace sprout { typedef sprout::detail::bind_helper helper_type; typedef typename helper_type::maybe_type maybe_type; typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(sprout::forward(f)), sprout::forward(args)...); + return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); } template inline SPROUT_CONSTEXPR typename sprout::res_cbind_result::type @@ -1027,7 +1026,7 @@ namespace sprout { typedef sprout::detail::res_bind_helper helper_type; typedef typename helper_type::maybe_type maybe_type; typedef typename helper_type::type result_type; - return result_type(maybe_type::do_wrap(sprout::forward(f)), sprout::forward(args)...); + return result_type(maybe_type::do_wrap(SPROUT_FORWARD(F, f)), SPROUT_FORWARD(BoundArgs, args)...); } } // namespace sprout diff --git a/sprout/functional/bit_and.hpp b/sprout/functional/bit_and.hpp index a8a9cf64..c8a30455 100644 --- a/sprout/functional/bit_and.hpp +++ b/sprout/functional/bit_and.hpp @@ -36,7 +36,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() & std::declval())) { - return sprout::forward(x) & sprout::forward(y); + return SPROUT_FORWARD(T, x) & SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bit_and_assign.hpp b/sprout/functional/bit_and_assign.hpp index d41fd687..c2d130e5 100644 --- a/sprout/functional/bit_and_assign.hpp +++ b/sprout/functional/bit_and_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() &= std::declval())) { - return sprout::forward(x) &= sprout::forward(y); + return SPROUT_FORWARD(T, x) &= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bit_not.hpp b/sprout/functional/bit_not.hpp index 5b1db2b0..36049834 100644 --- a/sprout/functional/bit_not.hpp +++ b/sprout/functional/bit_not.hpp @@ -35,7 +35,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(~std::declval())) { - return ~sprout::forward(x); + return ~SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/bit_or.hpp b/sprout/functional/bit_or.hpp index 2dadb265..511c85ee 100644 --- a/sprout/functional/bit_or.hpp +++ b/sprout/functional/bit_or.hpp @@ -36,7 +36,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() | std::declval())) { - return sprout::forward(x) | sprout::forward(y); + return SPROUT_FORWARD(T, x) | SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bit_or_assign.hpp b/sprout/functional/bit_or_assign.hpp index eb11e576..a184693e 100644 --- a/sprout/functional/bit_or_assign.hpp +++ b/sprout/functional/bit_or_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() |= std::declval())) { - return sprout::forward(x) |= sprout::forward(y); + return SPROUT_FORWARD(T, x) |= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bit_xor.hpp b/sprout/functional/bit_xor.hpp index 4d2caf27..1223ef36 100644 --- a/sprout/functional/bit_xor.hpp +++ b/sprout/functional/bit_xor.hpp @@ -36,7 +36,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() ^ std::declval())) { - return sprout::forward(x) ^ sprout::forward(y); + return SPROUT_FORWARD(T, x) ^ SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/bit_xor_assign.hpp b/sprout/functional/bit_xor_assign.hpp index 7346c0e5..29fa9e22 100644 --- a/sprout/functional/bit_xor_assign.hpp +++ b/sprout/functional/bit_xor_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() ^= std::declval())) { - return sprout::forward(x) ^= sprout::forward(y); + return SPROUT_FORWARD(T, x) ^= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/call_fun.hpp b/sprout/functional/call_fun.hpp index 98e972c4..87d2f5f8 100644 --- a/sprout/functional/call_fun.hpp +++ b/sprout/functional/call_fun.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(F&& f, As&&... as) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval()(std::declval()...))) { - return sprout::forward(f)(sprout::forward(as)...); + return SPROUT_FORWARD(F, f)(SPROUT_FORWARD(As, as)...); } }; } // namespace sprout diff --git a/sprout/functional/comma.hpp b/sprout/functional/comma.hpp index 05713abc..1ec44060 100644 --- a/sprout/functional/comma.hpp +++ b/sprout/functional/comma.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR((std::declval(), std::declval()))) { - return sprout::forward(x), sprout::forward(y); + return SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/cond.hpp b/sprout/functional/cond.hpp index 874171b6..587bc946 100644 --- a/sprout/functional/cond.hpp +++ b/sprout/functional/cond.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y, V&& z) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() ? std::declval() : std::declval())) { - return sprout::forward(x) ? sprout::forward(y) : sprout::forward(z); + return SPROUT_FORWARD(T, x) ? SPROUT_FORWARD(U, y) : SPROUT_FORWARD(V, z); } }; } // namespace sprout diff --git a/sprout/functional/dereference.hpp b/sprout/functional/dereference.hpp index 43e34a06..f253678b 100644 --- a/sprout/functional/dereference.hpp +++ b/sprout/functional/dereference.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(*std::declval())) { - return *sprout::forward(x); + return *SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/divides.hpp b/sprout/functional/divides.hpp index b0b14029..d86c5c37 100644 --- a/sprout/functional/divides.hpp +++ b/sprout/functional/divides.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() / std::declval())) { - return sprout::forward(x) / sprout::forward(y); + return SPROUT_FORWARD(T, x) / SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/divides_assign.hpp b/sprout/functional/divides_assign.hpp index 83245ad2..3305989e 100644 --- a/sprout/functional/divides_assign.hpp +++ b/sprout/functional/divides_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() /= std::declval())) { - return sprout::forward(x) /= sprout::forward(y); + return SPROUT_FORWARD(T, x) /= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/equal_to.hpp b/sprout/functional/equal_to.hpp index c65ce7ac..4c9d5780 100644 --- a/sprout/functional/equal_to.hpp +++ b/sprout/functional/equal_to.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() == std::declval())) { - return sprout::forward(x) == sprout::forward(y); + return SPROUT_FORWARD(T, x) == SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/equiv.hpp b/sprout/functional/equiv.hpp index ad9255d7..f234dab5 100644 --- a/sprout/functional/equiv.hpp +++ b/sprout/functional/equiv.hpp @@ -48,7 +48,7 @@ namespace sprout { template SPROUT_CONSTEXPR decltype(!std::declval()(std::declval(), std::declval()) && !std::declval()(std::declval(), std::declval())) operator()(T&& x, U&& y) const { - return !fn(sprout::forward(x), sprout::forward(y)) && !fn(sprout::forward(y), sprout::forward(x)); + return !fn(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)) && !fn(SPROUT_FORWARD(U, y), SPROUT_FORWARD(T, x)); } }; } // namespace detail diff --git a/sprout/functional/greater.hpp b/sprout/functional/greater.hpp index 47cdbec9..e1a6d054 100644 --- a/sprout/functional/greater.hpp +++ b/sprout/functional/greater.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() > std::declval())) { - return sprout::forward(x) > sprout::forward(y); + return SPROUT_FORWARD(T, x) > SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/greater_equal.hpp b/sprout/functional/greater_equal.hpp index 2e2d3129..a382e2fd 100644 --- a/sprout/functional/greater_equal.hpp +++ b/sprout/functional/greater_equal.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() >= std::declval())) { - return sprout::forward(x) >= sprout::forward(y); + return SPROUT_FORWARD(T, x) >= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/hash/hash.hpp b/sprout/functional/hash/hash.hpp index 265472e0..9032757a 100644 --- a/sprout/functional/hash/hash.hpp +++ b/sprout/functional/hash/hash.hpp @@ -48,9 +48,9 @@ namespace sprout { template SPROUT_CONSTEXPR std::size_t operator()(T&& v) - const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::to_hash(sprout::forward(v)))) + const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::to_hash(SPROUT_FORWARD(T, v)))) { - return sprout::to_hash(sprout::forward(v)); + return sprout::to_hash(SPROUT_FORWARD(T, v)); } }; diff --git a/sprout/functional/hash/to_hash.hpp b/sprout/functional/hash/to_hash.hpp index 91055c47..34b723b3 100644 --- a/sprout/functional/hash/to_hash.hpp +++ b/sprout/functional/hash/to_hash.hpp @@ -34,7 +34,7 @@ namespace sprout { to_hash(T&& v) { using sprout::hash_value; using sprout_adl::hash_value; - return hash_value(sprout::forward(v)); + return hash_value(SPROUT_FORWARD(T, v)); } } // namespace sprout diff --git a/sprout/functional/less.hpp b/sprout/functional/less.hpp index c5e4828c..6d205eea 100644 --- a/sprout/functional/less.hpp +++ b/sprout/functional/less.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() < std::declval())) { - return sprout::forward(x) < sprout::forward(y); + return SPROUT_FORWARD(T, x) < SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/less_equal.hpp b/sprout/functional/less_equal.hpp index a1c344c3..b257c50a 100644 --- a/sprout/functional/less_equal.hpp +++ b/sprout/functional/less_equal.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() <= std::declval())) { - return sprout::forward(x) <= sprout::forward(y); + return SPROUT_FORWARD(T, x) <= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/logical_and.hpp b/sprout/functional/logical_and.hpp index b59791c7..5c202035 100644 --- a/sprout/functional/logical_and.hpp +++ b/sprout/functional/logical_and.hpp @@ -36,7 +36,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() && std::declval())) { - return sprout::forward(x) && sprout::forward(y); + return SPROUT_FORWARD(T, x) && SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/logical_not.hpp b/sprout/functional/logical_not.hpp index 854b4211..a9e4eace 100644 --- a/sprout/functional/logical_not.hpp +++ b/sprout/functional/logical_not.hpp @@ -35,7 +35,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(!std::declval())) { - return !sprout::forward(x); + return !SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/logical_or.hpp b/sprout/functional/logical_or.hpp index 50e20b39..fb1e743e 100644 --- a/sprout/functional/logical_or.hpp +++ b/sprout/functional/logical_or.hpp @@ -36,7 +36,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() || std::declval())) { - return sprout::forward(x) || sprout::forward(y); + return SPROUT_FORWARD(T, x) || SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/mem_fn.hpp b/sprout/functional/mem_fn.hpp index b9a1ada9..b494d151 100644 --- a/sprout/functional/mem_fn.hpp +++ b/sprout/functional/mem_fn.hpp @@ -59,25 +59,25 @@ namespace sprout { private: template Res call(T& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } template Res call(T& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(sprout::forward(args)...); + return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); } public: explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...)) : pmf_(pmf) {} Res operator()(Class& object, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } Res operator()(Class* object, Args... args) const { - return (object->*pmf_)(sprout::forward(args)...); + return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); } template Res operator()(T& object, Args... args) const { - return call(object, &object, sprout::forward(args)...); + return call(object, &object, SPROUT_FORWARD(Args, args)...); } }; template @@ -93,25 +93,25 @@ namespace sprout { private: template SPROUT_CONSTEXPR Res call(T const& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } template SPROUT_CONSTEXPR Res call(T const& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(sprout::forward(args)...); + return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); } public: explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) const) : pmf_(pmf) {} SPROUT_CONSTEXPR Res operator()(Class const& object, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } SPROUT_CONSTEXPR Res operator()(Class const* object, Args... args) const { - return (object->*pmf_)(sprout::forward(args)...); + return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); } template SPROUT_CONSTEXPR Res operator()(T const& object, Args... args) const { - return call(object, &object, sprout::forward(args)...); + return call(object, &object, SPROUT_FORWARD(Args, args)...); } }; template @@ -127,25 +127,25 @@ namespace sprout { private: template Res call(T& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } template Res call(T& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(sprout::forward(args)...); + return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); } public: explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) volatile) : pmf_(pmf) {} Res operator()(Class volatile& object, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } Res operator()(Class volatile* object, Args... args) const { - return (object->*pmf_)(sprout::forward(args)...); + return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); } template Res operator()(T& object, Args... args) const { - return call(object, &object, sprout::forward(args)...); + return call(object, &object, SPROUT_FORWARD(Args, args)...); } }; template @@ -161,25 +161,25 @@ namespace sprout { private: template SPROUT_CONSTEXPR Res call(T const& object, Class const volatile*, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } template SPROUT_CONSTEXPR Res call(T const& ptr, void const volatile*, Args... args) const { - return ((*ptr).*pmf_)(sprout::forward(args)...); + return ((*ptr).*pmf_)(SPROUT_FORWARD(Args, args)...); } public: explicit SPROUT_CONSTEXPR mem_fn_adaptor(Res (Class::*pmf)(Args...) const volatile) : pmf_(pmf) {} SPROUT_CONSTEXPR Res operator()(Class const volatile& object, Args... args) const { - return (object.*pmf_)(sprout::forward(args)...); + return (object.*pmf_)(SPROUT_FORWARD(Args, args)...); } SPROUT_CONSTEXPR Res operator()(Class const volatile* object, Args... args) const { - return (object->*pmf_)(sprout::forward(args)...); + return (object->*pmf_)(SPROUT_FORWARD(Args, args)...); } template SPROUT_CONSTEXPR Res operator()(T const& object, Args... args) const { - return call(object, &object, sprout::forward(args)...); + return call(object, &object, SPROUT_FORWARD(Args, args)...); } }; diff --git a/sprout/functional/mem_ptr.hpp b/sprout/functional/mem_ptr.hpp index 250521ba..dc37e71e 100644 --- a/sprout/functional/mem_ptr.hpp +++ b/sprout/functional/mem_ptr.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval()->*std::declval())) { - return sprout::forward(x)->*sprout::forward(y); + return SPROUT_FORWARD(T, x)->*SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/member.hpp b/sprout/functional/member.hpp index 3b25b2c1..129111ed 100644 --- a/sprout/functional/member.hpp +++ b/sprout/functional/member.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval().*std::declval())) { - return sprout::forward(x).*sprout::forward(y); + return SPROUT_FORWARD(T, x).*SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/minus.hpp b/sprout/functional/minus.hpp index ecd732b7..d6d9e72d 100644 --- a/sprout/functional/minus.hpp +++ b/sprout/functional/minus.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() - std::declval())) { - return sprout::forward(x) - sprout::forward(y); + return SPROUT_FORWARD(T, x) - SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/minus_assign.hpp b/sprout/functional/minus_assign.hpp index 2f2e8ccb..8b21c289 100644 --- a/sprout/functional/minus_assign.hpp +++ b/sprout/functional/minus_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() -= std::declval())) { - return sprout::forward(x) -= sprout::forward(y); + return SPROUT_FORWARD(T, x) -= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/modulus.hpp b/sprout/functional/modulus.hpp index e42c0190..df1740fe 100644 --- a/sprout/functional/modulus.hpp +++ b/sprout/functional/modulus.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() % std::declval())) { - return sprout::forward(x) % sprout::forward(y); + return SPROUT_FORWARD(T, x) % SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/modulus_assign.hpp b/sprout/functional/modulus_assign.hpp index d95baa93..26decd50 100644 --- a/sprout/functional/modulus_assign.hpp +++ b/sprout/functional/modulus_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() %= std::declval())) { - return sprout::forward(x) %= sprout::forward(y); + return SPROUT_FORWARD(T, x) %= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/multiplies.hpp b/sprout/functional/multiplies.hpp index 53538816..ce53451f 100644 --- a/sprout/functional/multiplies.hpp +++ b/sprout/functional/multiplies.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() * std::declval())) { - return sprout::forward(x) * sprout::forward(y); + return SPROUT_FORWARD(T, x) * SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/multiplies_assign.hpp b/sprout/functional/multiplies_assign.hpp index 45c37a65..98519a90 100644 --- a/sprout/functional/multiplies_assign.hpp +++ b/sprout/functional/multiplies_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() *= std::declval())) { - return sprout::forward(x) *= sprout::forward(y); + return SPROUT_FORWARD(T, x) *= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/negate.hpp b/sprout/functional/negate.hpp index 42480ea1..ce806f18 100644 --- a/sprout/functional/negate.hpp +++ b/sprout/functional/negate.hpp @@ -37,7 +37,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(-std::declval())) { - return -sprout::forward(x); + return -SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/not1.hpp b/sprout/functional/not1.hpp index 65c2db9f..b29b9729 100644 --- a/sprout/functional/not1.hpp +++ b/sprout/functional/not1.hpp @@ -46,7 +46,7 @@ namespace sprout { template SPROUT_CONSTEXPR decltype(!std::declval()(std::declval())) operator()(T&& x) const { - return !fn(sprout::forward(x)); + return !fn(SPROUT_FORWARD(T, x)); } }; } // namespace detail diff --git a/sprout/functional/not2.hpp b/sprout/functional/not2.hpp index b2d2f8c1..a82be823 100644 --- a/sprout/functional/not2.hpp +++ b/sprout/functional/not2.hpp @@ -47,7 +47,7 @@ namespace sprout { template SPROUT_CONSTEXPR decltype(!std::declval()(std::declval(), std::declval())) operator()(T&& x, U&& y) const { - return !fn(sprout::forward(x), sprout::forward(y)); + return !fn(SPROUT_FORWARD(T, x), SPROUT_FORWARD(U, y)); } }; } // namespace detail diff --git a/sprout/functional/not_equal_to.hpp b/sprout/functional/not_equal_to.hpp index 2f19fc25..898fc231 100644 --- a/sprout/functional/not_equal_to.hpp +++ b/sprout/functional/not_equal_to.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() != std::declval())) { - return sprout::forward(x) != sprout::forward(y); + return SPROUT_FORWARD(T, x) != SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/plus.hpp b/sprout/functional/plus.hpp index d5c9ffc8..790e8a32 100644 --- a/sprout/functional/plus.hpp +++ b/sprout/functional/plus.hpp @@ -38,7 +38,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() + std::declval())) { - return sprout::forward(x) + sprout::forward(y); + return SPROUT_FORWARD(T, x) + SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/plus_assign.hpp b/sprout/functional/plus_assign.hpp index 99d457ae..78b20bff 100644 --- a/sprout/functional/plus_assign.hpp +++ b/sprout/functional/plus_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() += std::declval())) { - return sprout::forward(x) += sprout::forward(y); + return SPROUT_FORWARD(T, x) += SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/polymorphic/bind1st.hpp b/sprout/functional/polymorphic/bind1st.hpp index 84e06f21..336b4837 100644 --- a/sprout/functional/polymorphic/bind1st.hpp +++ b/sprout/functional/polymorphic/bind1st.hpp @@ -25,21 +25,21 @@ namespace sprout { T value; public: SPROUT_CONSTEXPR binder1st_(Fn&& x, T&& y) - : op(sprout::forward(x)), value(sprout::forward(y)) + : op(SPROUT_FORWARD(Fn, x)), value(SPROUT_FORWARD(T, y)) {} template SPROUT_CONSTEXPR decltype(op(value, std::declval())) operator()(Arg&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(op(value, std::declval()))) { - return op(value, sprout::forward(x)); + return op(value, SPROUT_FORWARD(Arg, x)); } }; template inline SPROUT_CONSTEXPR sprout::binder1st_::type, typename std::decay::type> bind1st_(Fn&& fn, T&& x) { typedef sprout::binder1st_::type, typename std::decay::type> type; - return type(sprout::forward(fn), sprout::forward(x)); + return type(SPROUT_FORWARD(Fn, fn), SPROUT_FORWARD(T, x)); } } // namespace sprout diff --git a/sprout/functional/polymorphic/bind2nd.hpp b/sprout/functional/polymorphic/bind2nd.hpp index b44fa8b7..85e68f9e 100644 --- a/sprout/functional/polymorphic/bind2nd.hpp +++ b/sprout/functional/polymorphic/bind2nd.hpp @@ -25,21 +25,21 @@ namespace sprout { T value; public: SPROUT_CONSTEXPR binder2nd_(Fn&& x, T&& y) - : op(sprout::forward(x)), value(sprout::forward(y)) + : op(SPROUT_FORWARD(Fn, x)), value(SPROUT_FORWARD(T, y)) {} template SPROUT_CONSTEXPR decltype(op(std::declval(), value)) operator()(Arg&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(op(std::declval(), value))) { - return op(sprout::forward(x), value); + return op(SPROUT_FORWARD(Arg, x), value); } }; template inline SPROUT_CONSTEXPR sprout::binder2nd_::type, typename std::decay::type> bind2nd_(Fn&& fn, T&& x) { typedef sprout::binder2nd_::type, typename std::decay::type> type; - return type(sprout::forward(fn), sprout::forward(x)); + return type(SPROUT_FORWARD(Fn, fn), SPROUT_FORWARD(T, x)); } } // namespace sprout diff --git a/sprout/functional/posite.hpp b/sprout/functional/posite.hpp index 3b64edda..e1fc8025 100644 --- a/sprout/functional/posite.hpp +++ b/sprout/functional/posite.hpp @@ -37,7 +37,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(+std::declval())) { - return +sprout::forward(x); + return +SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/post_dec.hpp b/sprout/functional/post_dec.hpp index 47b7cb95..f7299556 100644 --- a/sprout/functional/post_dec.hpp +++ b/sprout/functional/post_dec.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(~std::declval()--)) { - return sprout::forward(x)--; + return SPROUT_FORWARD(T, x)--; } }; } // namespace sprout diff --git a/sprout/functional/post_inc.hpp b/sprout/functional/post_inc.hpp index 780ce927..8cf07ff2 100644 --- a/sprout/functional/post_inc.hpp +++ b/sprout/functional/post_inc.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval()++)) { - return sprout::forward(x)++; + return SPROUT_FORWARD(T, x)++; } }; } // namespace sprout diff --git a/sprout/functional/pre_dec.hpp b/sprout/functional/pre_dec.hpp index ca420795..d2731579 100644 --- a/sprout/functional/pre_dec.hpp +++ b/sprout/functional/pre_dec.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(--std::declval())) { - return --sprout::forward(x); + return --SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/pre_inc.hpp b/sprout/functional/pre_inc.hpp index 95db6db5..a0047b2a 100644 --- a/sprout/functional/pre_inc.hpp +++ b/sprout/functional/pre_inc.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(++std::declval())) { - return ++sprout::forward(x); + return ++SPROUT_FORWARD(T, x); } }; } // namespace sprout diff --git a/sprout/functional/ref.hpp b/sprout/functional/ref.hpp index e993d35b..72d4ae4f 100644 --- a/sprout/functional/ref.hpp +++ b/sprout/functional/ref.hpp @@ -173,7 +173,7 @@ namespace sprout { template SPROUT_CONSTEXPR typename std::result_of::type operator()(Args&&... args) const { - return (*t_)(sprout::forward(args)...); + return (*t_)(SPROUT_FORWARD(Args, args)...); } }; diff --git a/sprout/functional/shift_left.hpp b/sprout/functional/shift_left.hpp index 9f6cb1b0..e0d44f71 100644 --- a/sprout/functional/shift_left.hpp +++ b/sprout/functional/shift_left.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() << std::declval())) { - return sprout::forward(x) << sprout::forward(y); + return SPROUT_FORWARD(T, x) << SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/shift_left_assign.hpp b/sprout/functional/shift_left_assign.hpp index 8ed7e550..62c0e2ce 100644 --- a/sprout/functional/shift_left_assign.hpp +++ b/sprout/functional/shift_left_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() <<= std::declval())) { - return sprout::forward(x) <<= sprout::forward(y); + return SPROUT_FORWARD(T, x) <<= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/shift_right.hpp b/sprout/functional/shift_right.hpp index 0b495795..5e430274 100644 --- a/sprout/functional/shift_right.hpp +++ b/sprout/functional/shift_right.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() << std::declval())) { - return sprout::forward(x) >> sprout::forward(y); + return SPROUT_FORWARD(T, x) >> SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/shift_right_assign.hpp b/sprout/functional/shift_right_assign.hpp index 1047de57..f63ac6e6 100644 --- a/sprout/functional/shift_right_assign.hpp +++ b/sprout/functional/shift_right_assign.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval() >>= std::declval())) { - return sprout::forward(x) >>= sprout::forward(y); + return SPROUT_FORWARD(T, x) >>= SPROUT_FORWARD(U, y); } }; } // namespace sprout diff --git a/sprout/functional/subscript.hpp b/sprout/functional/subscript.hpp index 78500552..76bdd9f1 100644 --- a/sprout/functional/subscript.hpp +++ b/sprout/functional/subscript.hpp @@ -28,7 +28,7 @@ namespace sprout { operator()(T&& x, U&& y) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::declval()[std::declval()])) { - return sprout::forward(x)[sprout::forward(y)]; + return SPROUT_FORWARD(T, x)[SPROUT_FORWARD(U, y)]; } }; } // namespace sprout diff --git a/sprout/generator/generated_value.hpp b/sprout/generator/generated_value.hpp index 54327564..710843dc 100644 --- a/sprout/generator/generated_value.hpp +++ b/sprout/generator/generated_value.hpp @@ -90,7 +90,7 @@ namespace sprout { generated_value(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout_generator_detail::call_get_generated_value(std::declval()))) { - return sprout_generator_detail::call_get_generated_value(sprout::forward(t)); + return sprout_generator_detail::call_get_generated_value(SPROUT_FORWARD(T, t)); } } // namespace generators diff --git a/sprout/generator/next_generator.hpp b/sprout/generator/next_generator.hpp index a5b8a60a..012b826f 100644 --- a/sprout/generator/next_generator.hpp +++ b/sprout/generator/next_generator.hpp @@ -90,7 +90,7 @@ namespace sprout { next_generator(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout_generator_detail::call_get_next_generator(std::declval()))) { - return sprout_generator_detail::call_get_next_generator(sprout::forward(t)); + return sprout_generator_detail::call_get_next_generator(SPROUT_FORWARD(T, t)); } } // namespace generators diff --git a/sprout/iterator/back_insert_iterator.hpp b/sprout/iterator/back_insert_iterator.hpp index 9d77b230..0669e73f 100644 --- a/sprout/iterator/back_insert_iterator.hpp +++ b/sprout/iterator/back_insert_iterator.hpp @@ -134,17 +134,17 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(sprout::forward(cont))); + return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(sprout::get_internal(sprout::forward(cont)), sprout::forward(args)...); + return remake_impl(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); } }; @@ -157,7 +157,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(sprout::forward(cont)); + return size + sprout::size(SPROUT_FORWARD(Cont, cont)); } }; diff --git a/sprout/iterator/front_insert_iterator.hpp b/sprout/iterator/front_insert_iterator.hpp index 0bb7277b..6ee7f321 100644 --- a/sprout/iterator/front_insert_iterator.hpp +++ b/sprout/iterator/front_insert_iterator.hpp @@ -134,17 +134,17 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(sprout::forward(cont))); + return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(sprout::get_internal(sprout::forward(cont)), sprout::forward(args)...); + return remake_impl(sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); } }; @@ -157,7 +157,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(sprout::forward(cont)); + return size + sprout::size(SPROUT_FORWARD(Cont, cont)); } }; diff --git a/sprout/iterator/insert_iterator.hpp b/sprout/iterator/insert_iterator.hpp index 9dc99036..39b3e287 100644 --- a/sprout/iterator/insert_iterator.hpp +++ b/sprout/iterator/insert_iterator.hpp @@ -145,17 +145,17 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::deep_copy(sprout::get_internal(sprout::forward(cont))); + return sprout::deep_copy(sprout::get_internal(SPROUT_FORWARD(Cont, cont))); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits::difference_type, Args&&... args) { - return remake_impl(cont.position(), sprout::get_internal(sprout::forward(cont)), sprout::forward(args)...); + return remake_impl(cont.position(), sprout::get_internal(SPROUT_FORWARD(Cont, cont)), SPROUT_FORWARD(Args, args)...); } }; @@ -168,7 +168,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename sprout::container_traits::difference_type fit_size(Cont&& cont, typename sprout::container_traits::difference_type size) { - return size + sprout::size(sprout::forward(cont)); + return size + sprout::size(SPROUT_FORWARD(Cont, cont)); } }; diff --git a/sprout/optional/make_optional.hpp b/sprout/optional/make_optional.hpp index 7555db34..26c39190 100644 --- a/sprout/optional/make_optional.hpp +++ b/sprout/optional/make_optional.hpp @@ -20,12 +20,12 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::optional::type> make_optional(T&& v) { - return sprout::optional::type>(sprout::forward(v)); + return sprout::optional::type>(SPROUT_FORWARD(T, v)); } template inline SPROUT_CONSTEXPR sprout::optional::type> make_optional(bool cond, T&& v) { - return sprout::optional::type>(cond, sprout::forward(v)); + return sprout::optional::type>(cond, SPROUT_FORWARD(T, v)); } } // namespace sprout diff --git a/sprout/optional/optional.hpp b/sprout/optional/optional.hpp index 3ac376a3..7300f313 100644 --- a/sprout/optional/optional.hpp +++ b/sprout/optional/optional.hpp @@ -131,7 +131,7 @@ namespace sprout { > explicit SPROUT_CONSTEXPR optional(sprout::in_place_t, Args&&... args) : init(true) - , val(sprout::in_place, sprout::forward(args)...) + , val(sprout::in_place, SPROUT_FORWARD(Args, args)...) {} template< typename U, typename... Args, @@ -139,7 +139,7 @@ namespace sprout { > explicit SPROUT_CONSTEXPR optional(sprout::in_place_t, std::initializer_list il, Args&&... args) : init(true) - , val(sprout::in_place, il, sprout::forward(args)...) + , val(sprout::in_place, il, SPROUT_FORWARD(Args, args)...) {} SPROUT_CONSTEXPR optional(bool cond, T const& v) : init(cond) @@ -172,7 +172,7 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR optional& operator=(optional&& v) SPROUT_NOEXCEPT_EXPR(std::is_move_constructible::value && std::is_move_assignable::value) { - assign(sprout::forward(v)); + assign(SPROUT_FORWARD(optional, v)); return *this; } template< @@ -181,7 +181,7 @@ namespace sprout { typename = typename std::enable_if::value>::type > SPROUT_CXX14_CONSTEXPR optional& operator=(U&& v) { - assign(sprout::forward(v)); + assign(SPROUT_FORWARD(U, v)); return *this; } template @@ -191,7 +191,7 @@ namespace sprout { } template SPROUT_CXX14_CONSTEXPR optional& operator=(optional&& v) { - assign(sprout::forward >(v)); + assign(SPROUT_FORWARD(optional, v)); return *this; } @@ -200,7 +200,7 @@ namespace sprout { typename = typename std::enable_if::value>::type > SPROUT_CXX14_CONSTEXPR void emplace(Args&&... args) { - optional temp(sprout::in_place, sprout::forward(args)...); + optional temp(sprout::in_place, SPROUT_FORWARD(Args, args)...); temp.swap(*this); } template< @@ -208,7 +208,7 @@ namespace sprout { typename = typename std::enable_if&, Args...>::value>::type > SPROUT_CXX14_CONSTEXPR void emplace(std::initializer_list il, Args&&... args) { - optional temp(sprout::in_place, il, sprout::forward(args)...); + optional temp(sprout::in_place, il, SPROUT_FORWARD(Args, args)...); temp.swap(*this); } @@ -222,7 +222,7 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR void assign(optional&& v) SPROUT_NOEXCEPT_EXPR(std::is_move_constructible::value && std::is_move_assignable::value) { - optional temp(sprout::forward(v)); + optional temp(SPROUT_FORWARD(optional, v)); temp.swap(*this); } template< @@ -231,7 +231,7 @@ namespace sprout { typename = typename std::enable_if::value>::type > SPROUT_CXX14_CONSTEXPR void assign(U&& v) { - optional temp(sprout::forward(v)); + optional temp(SPROUT_FORWARD(U, v)); temp.swap(*this); } template @@ -241,7 +241,7 @@ namespace sprout { } template SPROUT_CXX14_CONSTEXPR void assign(optional&& v) { - optional temp(sprout::forward >(v)); + optional temp(SPROUT_FORWARD(optional, v)); temp.swap(*this); } @@ -257,7 +257,7 @@ namespace sprout { typename = typename std::enable_if::value>::type > SPROUT_CXX14_CONSTEXPR void reset(U&& v) { - assign(sprout::forward(v)); + assign(SPROUT_FORWARD(U, v)); } // 20.6.4.4, swap SPROUT_CXX14_CONSTEXPR void swap(optional& other) diff --git a/sprout/pit/container.hpp b/sprout/pit/container.hpp index 8a0d960d..b9a66e58 100644 --- a/sprout/pit/container.hpp +++ b/sprout/pit/container.hpp @@ -35,12 +35,12 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(sprout::forward(cont), size, sprout::forward(args)...); + return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); } }; @@ -60,12 +60,12 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { - return sprout::remake(sprout::forward(cont), size, sprout::forward(args)...); + return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type diff --git a/sprout/random/results.hpp b/sprout/random/results.hpp index b476dc91..0776a0c6 100644 --- a/sprout/random/results.hpp +++ b/sprout/random/results.hpp @@ -23,7 +23,7 @@ namespace sprout { result(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::generators::generated_value(std::declval()))) { - return sprout::generators::generated_value(sprout::forward(t)); + return sprout::generators::generated_value(SPROUT_FORWARD(T, t)); } // @@ -34,7 +34,7 @@ namespace sprout { next(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::generators::next_generator(std::declval()))) { - return sprout::generators::next_generator(sprout::forward(t)); + return sprout::generators::next_generator(SPROUT_FORWARD(T, t)); } } // namespace random } // namespace sprout diff --git a/sprout/random/seed_array.hpp b/sprout/random/seed_array.hpp index 85c73fcd..e2b772cc 100644 --- a/sprout/random/seed_array.hpp +++ b/sprout/random/seed_array.hpp @@ -358,7 +358,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::random::seed_array make_seed_array(Args&&... args) { return sprout::random::seed_array( - sprout::make_common_array(sprout::forward(args)...) + sprout::make_common_array(SPROUT_FORWARD(Args, args)...) ); } } // namespace random diff --git a/sprout/range/adaptor/deep_copied.hpp b/sprout/range/adaptor/deep_copied.hpp index a12a8d1a..95158124 100644 --- a/sprout/range/adaptor/deep_copied.hpp +++ b/sprout/range/adaptor/deep_copied.hpp @@ -35,7 +35,7 @@ namespace sprout { typename std::remove_reference::type >::copied_type operator|(Range&& lhs, sprout::adaptors::deep_copied_forwarder const&) { - return sprout::deep_copy(sprout::forward(lhs)); + return sprout::deep_copy(SPROUT_FORWARD(Range, lhs)); } } // namespace adaptors } // namespace sprout diff --git a/sprout/range/adaptor/detail/adapted_range_default.hpp b/sprout/range/adaptor/detail/adapted_range_default.hpp index aa02bf2c..0a5e2d51 100644 --- a/sprout/range/adaptor/detail/adapted_range_default.hpp +++ b/sprout/range/adaptor/detail/adapted_range_default.hpp @@ -49,11 +49,11 @@ namespace sprout { public: template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(sprout::forward(cont), sprout::pit()); + return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake( @@ -62,7 +62,7 @@ namespace sprout { Args&&... args ) { - return sprout::remake(sprout::forward(cont), size, sprout::forward(args)...); + return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); } }; } // namespace sprout diff --git a/sprout/range/adaptor/detail/jointed_range_default.hpp b/sprout/range/adaptor/detail/jointed_range_default.hpp index ed94bffa..2887aca9 100644 --- a/sprout/range/adaptor/detail/jointed_range_default.hpp +++ b/sprout/range/adaptor/detail/jointed_range_default.hpp @@ -189,11 +189,11 @@ namespace sprout { public: template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(sprout::forward(cont), sprout::pit()); + return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake( @@ -202,7 +202,7 @@ namespace sprout { Args&&... args ) { - return sprout::remake(sprout::forward(cont), size, sprout::forward(args)...); + return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); } }; } // namespace sprout diff --git a/sprout/range/adaptor/detail/sized_range_default.hpp b/sprout/range/adaptor/detail/sized_range_default.hpp index 7d040b52..012bd9b1 100644 --- a/sprout/range/adaptor/detail/sized_range_default.hpp +++ b/sprout/range/adaptor/detail/sized_range_default.hpp @@ -97,11 +97,11 @@ namespace sprout { public: template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::range::fixed::copy(sprout::forward(cont), sprout::pit()); + return sprout::range::fixed::copy(SPROUT_FORWARD(Cont, cont), sprout::pit()); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::make(sprout::forward(args)...); + return sprout::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake( @@ -110,7 +110,7 @@ namespace sprout { Args&&... args ) { - return sprout::remake(sprout::forward(cont), size, sprout::forward(args)...); + return sprout::remake(SPROUT_FORWARD(Cont, cont), size, SPROUT_FORWARD(Args, args)...); } }; } // namespace sprout diff --git a/sprout/range/adaptor/piped.hpp b/sprout/range/adaptor/piped.hpp index 7997a58f..c6f0828c 100644 --- a/sprout/range/adaptor/piped.hpp +++ b/sprout/range/adaptor/piped.hpp @@ -23,23 +23,23 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto apply_adaptors_impl(Range&& range) - -> decltype(sprout::forward(range)) + -> decltype(SPROUT_FORWARD(Range, range)) { - return sprout::forward(range); + return SPROUT_FORWARD(Range, range); } template inline SPROUT_CONSTEXPR auto apply_adaptors_impl(Range&& range, Adaptor const& adaptor) - -> decltype(sprout::forward(range) | adaptor) + -> decltype(SPROUT_FORWARD(Range, range) | adaptor) { - return sprout::forward(range) | adaptor; + return SPROUT_FORWARD(Range, range) | adaptor; } template inline SPROUT_CONSTEXPR auto apply_adaptors_impl(Range&& range, Adaptor const& adaptor, Tail const&... tail) - -> decltype(sprout::adaptors::detail::apply_adaptors_impl(sprout::forward(range) | adaptor, tail...)) + -> decltype(sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range) | adaptor, tail...)) { - return sprout::adaptors::detail::apply_adaptors_impl(sprout::forward(range) | adaptor, tail...); + return sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range) | adaptor, tail...); } } // namespace detail // @@ -48,31 +48,31 @@ namespace sprout { template SPROUT_CONSTEXPR auto apply_adaptors(Range&& range, Adaptors const&... adaptors) - -> decltype(sprout::adaptors::detail::apply_adaptors_impl(sprout::forward(range), adaptors...)) + -> decltype(sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range), adaptors...)) { - return sprout::adaptors::detail::apply_adaptors_impl(sprout::forward(range), adaptors...); + return sprout::adaptors::detail::apply_adaptors_impl(SPROUT_FORWARD(Range, range), adaptors...); } namespace detail { template SPROUT_CONSTEXPR auto apply_adaptors_tuple_impl(Range&& range, AdaptorsTuple const& adaptors, sprout::index_tuple) - -> decltype(sprout::adaptors::apply_adaptors(sprout::forward(range), sprout::tuples::get(adaptors)...)) + -> decltype(sprout::adaptors::apply_adaptors(SPROUT_FORWARD(Range, range), sprout::tuples::get(adaptors)...)) { - return sprout::adaptors::apply_adaptors(sprout::forward(range), sprout::tuples::get(adaptors)...); + return sprout::adaptors::apply_adaptors(SPROUT_FORWARD(Range, range), sprout::tuples::get(adaptors)...); } template SPROUT_CONSTEXPR auto apply_adaptors_tuple(Range&& range, AdaptorsTuple const& adaptors) -> decltype( sprout::adaptors::detail::apply_adaptors_tuple_impl( - sprout::forward(range), adaptors, + SPROUT_FORWARD(Range, range), adaptors, sprout::make_index_tuple::value>::make() ) ) { return sprout::adaptors::detail::apply_adaptors_tuple_impl( - sprout::forward(range), adaptors, + SPROUT_FORWARD(Range, range), adaptors, sprout::make_index_tuple::value>::make() ); } @@ -97,9 +97,9 @@ namespace sprout { template SPROUT_CONSTEXPR auto apply(Range&& range) const - -> decltype(sprout::adaptors::detail::apply_adaptors_tuple(sprout::forward(range), std::declval().adaptors())) + -> decltype(sprout::adaptors::detail::apply_adaptors_tuple(SPROUT_FORWARD(Range, range), std::declval().adaptors())) { - return sprout::adaptors::detail::apply_adaptors_tuple(sprout::forward(range), adaptors()); + return sprout::adaptors::detail::apply_adaptors_tuple(SPROUT_FORWARD(Range, range), adaptors()); } }; diff --git a/sprout/range/algorithm/adjacent_find.hpp b/sprout/range/algorithm/adjacent_find.hpp index 4fad47ed..1bc2767f 100644 --- a/sprout/range/algorithm/adjacent_find.hpp +++ b/sprout/range/algorithm/adjacent_find.hpp @@ -24,10 +24,10 @@ namespace sprout { adjacent_find(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::adjacent_find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -36,11 +36,11 @@ namespace sprout { adjacent_find(ForwardRange&& range, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::adjacent_find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -49,10 +49,10 @@ namespace sprout { adjacent_find(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::adjacent_find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -61,11 +61,11 @@ namespace sprout { adjacent_find(ForwardRange&& range, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::adjacent_find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/equal_range.hpp b/sprout/range/algorithm/equal_range.hpp index eee21f5f..acccc358 100644 --- a/sprout/range/algorithm/equal_range.hpp +++ b/sprout/range/algorithm/equal_range.hpp @@ -32,8 +32,8 @@ namespace sprout { equal_range(ForwardRange&& range, T const& value) { return sprout::range::detail::pair_to_range( sprout::equal_range( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value ) ); @@ -44,8 +44,8 @@ namespace sprout { equal_range(ForwardRange&& range, T const& value, Compare comp) { return sprout::range::detail::pair_to_range( sprout::equal_range( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value, comp ) diff --git a/sprout/range/algorithm/find.hpp b/sprout/range/algorithm/find.hpp index 1171105b..4b787c4b 100644 --- a/sprout/range/algorithm/find.hpp +++ b/sprout/range/algorithm/find.hpp @@ -24,11 +24,11 @@ namespace sprout { find(InputRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } @@ -37,11 +37,11 @@ namespace sprout { find(InputRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::find( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/find_difference.hpp b/sprout/range/algorithm/find_difference.hpp index e2c85de0..c82360ad 100644 --- a/sprout/range/algorithm/find_difference.hpp +++ b/sprout/range/algorithm/find_difference.hpp @@ -27,10 +27,10 @@ namespace sprout { > find_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::find_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > find_difference(InputRange1&& range1, InputRange2&& range2) { return sprout::find_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/find_end.hpp b/sprout/range/algorithm/find_end.hpp index f30241a2..7ada363d 100644 --- a/sprout/range/algorithm/find_end.hpp +++ b/sprout/range/algorithm/find_end.hpp @@ -24,12 +24,12 @@ namespace sprout { find_end(ForwardRange1&& range1, ForwardRange2&& range2) { return sprout::range::range_return::pack( sprout::find_end( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -38,13 +38,13 @@ namespace sprout { find_end(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::find_end( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -53,12 +53,12 @@ namespace sprout { find_end(ForwardRange1&& range1, ForwardRange2&& range2) { return sprout::range::range_return::pack( sprout::find_end( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -67,13 +67,13 @@ namespace sprout { find_end(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::find_end( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } } // namespace range diff --git a/sprout/range/algorithm/find_first_of.hpp b/sprout/range/algorithm/find_first_of.hpp index 2a37d39a..b1d5c097 100644 --- a/sprout/range/algorithm/find_first_of.hpp +++ b/sprout/range/algorithm/find_first_of.hpp @@ -24,12 +24,12 @@ namespace sprout { find_first_of(InputRange1&& range1, InputRange2&& range2) { return sprout::range::range_return::pack( sprout::find_first_of( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(InputRange1, range1) ); } @@ -38,13 +38,13 @@ namespace sprout { find_first_of(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::find_first_of( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(InputRange1, range1) ); } @@ -53,12 +53,12 @@ namespace sprout { find_first_of(InputRange1&& range1, InputRange2&& range2) { return sprout::range::range_return::pack( sprout::find_first_of( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(InputRange1, range1) ); } @@ -67,13 +67,13 @@ namespace sprout { find_first_of(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::find_first_of( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(InputRange1, range1) ); } } // namespace range diff --git a/sprout/range/algorithm/find_if.hpp b/sprout/range/algorithm/find_if.hpp index b69078df..68b2c171 100644 --- a/sprout/range/algorithm/find_if.hpp +++ b/sprout/range/algorithm/find_if.hpp @@ -24,11 +24,11 @@ namespace sprout { find_if(InputRange&& range, Predicate pred) { return sprout::range::range_return::pack( sprout::find_if( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } @@ -37,11 +37,11 @@ namespace sprout { find_if(InputRange&& range, Predicate pred) { return sprout::range::range_return::pack( sprout::find_if( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/find_if_not.hpp b/sprout/range/algorithm/find_if_not.hpp index ff4a9365..98b030d8 100644 --- a/sprout/range/algorithm/find_if_not.hpp +++ b/sprout/range/algorithm/find_if_not.hpp @@ -24,11 +24,11 @@ namespace sprout { find_if_not(InputRange&& range, Predicate pred) { return sprout::range::range_return::pack( sprout::find_if_not( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } @@ -37,11 +37,11 @@ namespace sprout { find_if_not(InputRange&& range, Predicate pred) { return sprout::range::range_return::pack( sprout::find_if_not( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(InputRange, range)), + sprout::end(SPROUT_FORWARD(InputRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(InputRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/find_intersection.hpp b/sprout/range/algorithm/find_intersection.hpp index 4e5dcb5a..acc7a952 100644 --- a/sprout/range/algorithm/find_intersection.hpp +++ b/sprout/range/algorithm/find_intersection.hpp @@ -27,10 +27,10 @@ namespace sprout { > find_intersection(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::find_intersection( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > find_intersection(InputRange1&& range1, InputRange2&& range2) { return sprout::find_intersection( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/find_symmetric_difference.hpp b/sprout/range/algorithm/find_symmetric_difference.hpp index be5fc2a3..56301f3e 100644 --- a/sprout/range/algorithm/find_symmetric_difference.hpp +++ b/sprout/range/algorithm/find_symmetric_difference.hpp @@ -27,10 +27,10 @@ namespace sprout { > find_symmetric_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::find_symmetric_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > find_symmetric_difference(InputRange1&& range1, InputRange2&& range2) { return sprout::find_symmetric_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/is_heap_until.hpp b/sprout/range/algorithm/is_heap_until.hpp index 05e22717..acb15744 100644 --- a/sprout/range/algorithm/is_heap_until.hpp +++ b/sprout/range/algorithm/is_heap_until.hpp @@ -24,10 +24,10 @@ namespace sprout { is_heap_until(RandomAccessRange&& range) { return sprout::range::range_return::pack( sprout::is_heap_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), + sprout::end(SPROUT_FORWARD(RandomAccessRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(RandomAccessRange, range) ); } @@ -36,11 +36,11 @@ namespace sprout { is_heap_until(RandomAccessRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::is_heap_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), + sprout::end(SPROUT_FORWARD(RandomAccessRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(RandomAccessRange, range) ); } @@ -49,10 +49,10 @@ namespace sprout { is_heap_until(RandomAccessRange&& range) { return sprout::range::range_return::pack( sprout::is_heap_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), + sprout::end(SPROUT_FORWARD(RandomAccessRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(RandomAccessRange, range) ); } @@ -61,11 +61,11 @@ namespace sprout { is_heap_until(RandomAccessRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::is_heap_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(RandomAccessRange, range)), + sprout::end(SPROUT_FORWARD(RandomAccessRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(RandomAccessRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/is_sorted_until.hpp b/sprout/range/algorithm/is_sorted_until.hpp index 56d39bbe..18baa54b 100644 --- a/sprout/range/algorithm/is_sorted_until.hpp +++ b/sprout/range/algorithm/is_sorted_until.hpp @@ -24,10 +24,10 @@ namespace sprout { is_sorted_until(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::is_sorted_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -36,11 +36,11 @@ namespace sprout { is_sorted_until(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::is_sorted_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -49,10 +49,10 @@ namespace sprout { is_sorted_until(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::is_sorted_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -61,11 +61,11 @@ namespace sprout { is_sorted_until(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::is_sorted_until( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/lower_bound.hpp b/sprout/range/algorithm/lower_bound.hpp index c03fbef4..c86dab01 100644 --- a/sprout/range/algorithm/lower_bound.hpp +++ b/sprout/range/algorithm/lower_bound.hpp @@ -24,11 +24,11 @@ namespace sprout { lower_bound(ForwardRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::lower_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -37,12 +37,12 @@ namespace sprout { lower_bound(ForwardRange&& range, T const& value, Compare comp) { return sprout::range::range_return::pack( sprout::lower_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value, comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -51,11 +51,11 @@ namespace sprout { lower_bound(ForwardRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::lower_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -64,12 +64,12 @@ namespace sprout { lower_bound(ForwardRange&& range, T const& value, Compare comp) { return sprout::range::range_return::pack( sprout::lower_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value, comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/max_element.hpp b/sprout/range/algorithm/max_element.hpp index cc066ebe..05a998e5 100644 --- a/sprout/range/algorithm/max_element.hpp +++ b/sprout/range/algorithm/max_element.hpp @@ -24,10 +24,10 @@ namespace sprout { max_element(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::max_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -36,11 +36,11 @@ namespace sprout { max_element(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::max_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -49,10 +49,10 @@ namespace sprout { max_element(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::max_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -61,11 +61,11 @@ namespace sprout { max_element(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::max_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/min_element.hpp b/sprout/range/algorithm/min_element.hpp index 1d323080..8428a80a 100644 --- a/sprout/range/algorithm/min_element.hpp +++ b/sprout/range/algorithm/min_element.hpp @@ -24,10 +24,10 @@ namespace sprout { min_element(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::min_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -36,11 +36,11 @@ namespace sprout { min_element(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::min_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -49,10 +49,10 @@ namespace sprout { min_element(ForwardRange&& range) { return sprout::range::range_return::pack( sprout::min_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -61,11 +61,11 @@ namespace sprout { min_element(ForwardRange&& range, Compare comp) { return sprout::range::range_return::pack( sprout::min_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/minmax_element.hpp b/sprout/range/algorithm/minmax_element.hpp index 79db3737..c98c946b 100644 --- a/sprout/range/algorithm/minmax_element.hpp +++ b/sprout/range/algorithm/minmax_element.hpp @@ -26,8 +26,8 @@ namespace sprout { > pack_pair(Pair const& pair, ForwardRange&& range) { return { - sprout::range::range_return::pack(pair.first, sprout::forward(range)), - sprout::range::range_return::pack(pair.second, sprout::forward(range)) + sprout::range::range_return::pack(pair.first, SPROUT_FORWARD(ForwardRange, range)), + sprout::range::range_return::pack(pair.second, SPROUT_FORWARD(ForwardRange, range)) }; } @@ -38,8 +38,8 @@ namespace sprout { > pack_pair(Pair const& pair, ForwardRange&& range) { return { - sprout::range::range_return::pack(pair.first, sprout::forward(range)), - sprout::range::range_return::pack(pair.second, sprout::forward(range)) + sprout::range::range_return::pack(pair.first, SPROUT_FORWARD(ForwardRange, range)), + sprout::range::range_return::pack(pair.second, SPROUT_FORWARD(ForwardRange, range)) }; } } // namespace detail @@ -54,10 +54,10 @@ namespace sprout { minmax_element(ForwardRange&& range) { return sprout::range::detail::pack_pair( sprout::minmax_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -69,11 +69,11 @@ namespace sprout { minmax_element(ForwardRange&& range, Compare comp) { return sprout::range::detail::pack_pair( sprout::minmax_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -85,10 +85,10 @@ namespace sprout { minmax_element(ForwardRange&& range) { return sprout::range::detail::pack_pair( sprout::minmax_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)) ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -100,11 +100,11 @@ namespace sprout { minmax_element(ForwardRange&& range, Compare comp) { return sprout::range::detail::pack_pair( sprout::minmax_element( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/mismatch.hpp b/sprout/range/algorithm/mismatch.hpp index 890fc0a5..970b1c41 100644 --- a/sprout/range/algorithm/mismatch.hpp +++ b/sprout/range/algorithm/mismatch.hpp @@ -27,9 +27,9 @@ namespace sprout { > mismatch(InputRange1&& range1, InputRange2&& range2) { return sprout::mismatch( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)) ); } @@ -40,9 +40,9 @@ namespace sprout { > mismatch(InputRange1&& range1, InputRange2&& range2, BinaryPredicate pred) { return sprout::mismatch( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), pred ); } diff --git a/sprout/range/algorithm/next_difference.hpp b/sprout/range/algorithm/next_difference.hpp index be3df7de..107bda66 100644 --- a/sprout/range/algorithm/next_difference.hpp +++ b/sprout/range/algorithm/next_difference.hpp @@ -27,10 +27,10 @@ namespace sprout { > next_difference(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::next_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > next_difference(InputRange1&& range1, InputRange2&& range2) { return sprout::next_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/next_intersection.hpp b/sprout/range/algorithm/next_intersection.hpp index e474d2a2..6f8b731c 100644 --- a/sprout/range/algorithm/next_intersection.hpp +++ b/sprout/range/algorithm/next_intersection.hpp @@ -27,10 +27,10 @@ namespace sprout { > next_intersection(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::next_intersection( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > next_intersection(InputRange1&& range1, InputRange2&& range2) { return sprout::next_intersection( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/next_symmetric_difference.hpp b/sprout/range/algorithm/next_symmetric_difference.hpp index 99c20acd..cc33bb0f 100644 --- a/sprout/range/algorithm/next_symmetric_difference.hpp +++ b/sprout/range/algorithm/next_symmetric_difference.hpp @@ -27,10 +27,10 @@ namespace sprout { > next_symmetric_difference(Range1&& range1, Range2&& range2, Compare comp) { return sprout::next_symmetric_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(Range1, range1)), + sprout::end(SPROUT_FORWARD(Range1, range1)), + sprout::begin(SPROUT_FORWARD(Range2, range2)), + sprout::end(SPROUT_FORWARD(Range2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > next_symmetric_difference(Range1&& range1, Range2&& range2) { return sprout::next_symmetric_difference( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(Range1, range1)), + sprout::end(SPROUT_FORWARD(Range1, range1)), + sprout::begin(SPROUT_FORWARD(Range2, range2)), + sprout::end(SPROUT_FORWARD(Range2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/next_union.hpp b/sprout/range/algorithm/next_union.hpp index 6fd7f3ff..ccacf57d 100644 --- a/sprout/range/algorithm/next_union.hpp +++ b/sprout/range/algorithm/next_union.hpp @@ -27,10 +27,10 @@ namespace sprout { > next_union(InputRange1&& range1, InputRange2&& range2, Compare comp) { return sprout::next_union( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)), comp ); } @@ -42,10 +42,10 @@ namespace sprout { > next_union(InputRange1&& range1, InputRange2&& range2) { return sprout::next_union( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(InputRange1, range1)), + sprout::end(SPROUT_FORWARD(InputRange1, range1)), + sprout::begin(SPROUT_FORWARD(InputRange2, range2)), + sprout::end(SPROUT_FORWARD(InputRange2, range2)) ); } } // namespace range diff --git a/sprout/range/algorithm/partition_point.hpp b/sprout/range/algorithm/partition_point.hpp index 7692a0a8..ce421d63 100644 --- a/sprout/range/algorithm/partition_point.hpp +++ b/sprout/range/algorithm/partition_point.hpp @@ -24,11 +24,11 @@ namespace sprout { partition_point(ForwardRange&& range, Predicate pred) { return sprout::range::range_return::pack( sprout::partition_point( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), pred ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/search.hpp b/sprout/range/algorithm/search.hpp index 9df9b965..52582fd4 100644 --- a/sprout/range/algorithm/search.hpp +++ b/sprout/range/algorithm/search.hpp @@ -24,12 +24,12 @@ namespace sprout { search(ForwardRange1&& range1, ForwardRange2&& range2) { return sprout::range::range_return::pack( sprout::search( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -38,13 +38,13 @@ namespace sprout { search(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::search( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -53,12 +53,12 @@ namespace sprout { search(ForwardRange1&& range1, ForwardRange2&& range2) { return sprout::range::range_return::pack( sprout::search( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)) + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)) ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } @@ -67,13 +67,13 @@ namespace sprout { search(ForwardRange1&& range1, ForwardRange2&& range2, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::search( - sprout::begin(sprout::forward(range1)), - sprout::end(sprout::forward(range1)), - sprout::begin(sprout::forward(range2)), - sprout::end(sprout::forward(range2)), + sprout::begin(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::end(SPROUT_FORWARD(ForwardRange1, range1)), + sprout::begin(SPROUT_FORWARD(ForwardRange2, range2)), + sprout::end(SPROUT_FORWARD(ForwardRange2, range2)), pred ), - sprout::forward(range1) + SPROUT_FORWARD(ForwardRange1, range1) ); } } // namespace range diff --git a/sprout/range/algorithm/search_n.hpp b/sprout/range/algorithm/search_n.hpp index 94c13a1f..c7d57448 100644 --- a/sprout/range/algorithm/search_n.hpp +++ b/sprout/range/algorithm/search_n.hpp @@ -24,12 +24,12 @@ namespace sprout { search_n(ForwardRange&& range, Size count, T const& value) { return sprout::range::range_return::pack( sprout::search_n( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), count, value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -38,13 +38,13 @@ namespace sprout { search_n(ForwardRange&& range, Size count, T const& value, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::search_n( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), count, value, pred ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -53,12 +53,12 @@ namespace sprout { search_n(ForwardRange&& range, Size count, T const& value) { return sprout::range::range_return::pack( sprout::search_n( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), count, value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -67,13 +67,13 @@ namespace sprout { search_n(ForwardRange&& range, Size count, T const& value, BinaryPredicate pred) { return sprout::range::range_return::pack( sprout::search_n( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), count, value, pred ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/algorithm/upper_bound.hpp b/sprout/range/algorithm/upper_bound.hpp index 753710ee..c6a2ab7b 100644 --- a/sprout/range/algorithm/upper_bound.hpp +++ b/sprout/range/algorithm/upper_bound.hpp @@ -24,11 +24,11 @@ namespace sprout { upper_bound(ForwardRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::upper_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -37,12 +37,12 @@ namespace sprout { upper_bound(ForwardRange&& range, T const& value, Compare comp) { return sprout::range::range_return::pack( sprout::upper_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value, comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -51,11 +51,11 @@ namespace sprout { upper_bound(ForwardRange&& range, T const& value) { return sprout::range::range_return::pack( sprout::upper_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } @@ -64,12 +64,12 @@ namespace sprout { upper_bound(ForwardRange&& range, T const& value, Compare comp) { return sprout::range::range_return::pack( sprout::upper_bound( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)), + sprout::begin(SPROUT_FORWARD(ForwardRange, range)), + sprout::end(SPROUT_FORWARD(ForwardRange, range)), value, comp ), - sprout::forward(range) + SPROUT_FORWARD(ForwardRange, range) ); } } // namespace range diff --git a/sprout/range/range_container.hpp b/sprout/range/range_container.hpp index 50215d32..d8c7e6ef 100644 --- a/sprout/range/range_container.hpp +++ b/sprout/range/range_container.hpp @@ -144,8 +144,8 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::range::range_container::type> make_range_container(Range&& range) { return sprout::range::range_container::type>( - sprout::begin(sprout::forward(range)), - sprout::end(sprout::forward(range)) + sprout::begin(SPROUT_FORWARD(Range, range)), + sprout::end(SPROUT_FORWARD(Range, range)) ); } } // namespace range diff --git a/sprout/range/range_return.hpp b/sprout/range/range_return.hpp index 875a28e8..fdfe189b 100644 --- a/sprout/range/range_return.hpp +++ b/sprout/range/range_return.hpp @@ -55,7 +55,7 @@ namespace sprout { Range&& range ) { - return type(found, sprout::end(sprout::forward(range))); + return type(found, sprout::end(SPROUT_FORWARD(Range, range))); } }; template @@ -68,7 +68,7 @@ namespace sprout { Range&& range ) { - return type(sprout::begin(sprout::forward(range)), found); + return type(sprout::begin(SPROUT_FORWARD(Range, range)), found); } }; } // namespace range diff --git a/sprout/string/container.hpp b/sprout/string/container.hpp index dc4cd41b..e4716e3f 100644 --- a/sprout/string/container.hpp +++ b/sprout/string/container.hpp @@ -26,19 +26,19 @@ namespace sprout { template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { - return sprout::forward(cont); + return SPROUT_FORWARD(Cont, cont); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { typedef sprout::detail::make_construct_impl impl_type; - return impl_type::make(sprout::forward(args)...); + return impl_type::make(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake(Cont&&, typename sprout::container_traits >::difference_type size, Args&&... args) { typedef sprout::detail::make_construct_impl impl_type; - return impl_type::make(static_cast(size), sprout::forward(args)...); + return impl_type::make(static_cast(size), SPROUT_FORWARD(Args, args)...); } }; diff --git a/sprout/string/make_string.hpp b/sprout/string/make_string.hpp index a7447354..ca435e52 100644 --- a/sprout/string/make_string.hpp +++ b/sprout/string/make_string.hpp @@ -25,7 +25,7 @@ namespace sprout { typedef sprout::detail::make_construct_impl< sprout::basic_string::type, 1 + sizeof...(Types)> > impl_type; - return impl_type::make(sprout::forward(t), sprout::forward(args)...); + return impl_type::make(SPROUT_FORWARD(T, t), SPROUT_FORWARD(Types, args)...); } // @@ -42,7 +42,7 @@ namespace sprout { typedef sprout::detail::make_construct_impl< sprout::basic_string::type, sizeof...(Types)> > impl_type; - return impl_type::make(sprout::forward(args)...); + return impl_type::make(SPROUT_FORWARD(Types, args)...); } } // namespace sprout diff --git a/sprout/string/string.hpp b/sprout/string/string.hpp index b590c8e0..e644d3ba 100644 --- a/sprout/string/string.hpp +++ b/sprout/string/string.hpp @@ -57,7 +57,7 @@ namespace sprout { {} template explicit SPROUT_CONSTEXPR constant_size_source(size_type n, Args&&... args) - : arr_{{static_cast(sprout::forward(args))...}}, size_(n) + : arr_{{static_cast(SPROUT_FORWARD(Args, args))...}}, size_(n) {} SPROUT_CONSTEXPR size_type size() const { return size_; @@ -194,7 +194,7 @@ namespace sprout { sprout::detail::string_raw_construct_t, size_type n, Args&&... args ) : elems{ - (sprout::math::less(Indexes, n) ? static_cast(sprout::forward(args)) + (sprout::math::less(Indexes, n) ? static_cast(SPROUT_FORWARD(Args, args)) : value_type() )... } @@ -279,7 +279,7 @@ namespace sprout { SPROUT_CONSTEXPR basic_string(sprout::detail::string_raw_construct_t, size_type n, Args&&... args) : impl_type( sprout::index_pack::make(), - sprout::detail::string_raw_construct_t(), n, sprout::forward(args)... + sprout::detail::string_raw_construct_t(), n, SPROUT_FORWARD(Args, args)... ) {} SPROUT_CXX14_CONSTEXPR void maxcheck(size_type n) const { @@ -957,7 +957,7 @@ namespace sprout { template static SPROUT_CONSTEXPR sprout::basic_string raw_construct(typename sprout::basic_string::size_type n, Args&&... args) { - return sprout::basic_string(sprout::detail::string_raw_construct_t(), n, sprout::forward(args)...); + return sprout::basic_string(sprout::detail::string_raw_construct_t(), n, SPROUT_FORWARD(Args, args)...); } }; @@ -978,19 +978,19 @@ namespace sprout { template static SPROUT_CONSTEXPR typename copied_type::size_type length(Args&&... args) { - return length_impl(sprout::make_array(sprout::forward(args)...)); + return length_impl(sprout::make_array(SPROUT_FORWARD(Args, args)...)); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct(length(args...), sprout::forward(args)...); + return access_type::raw_construct(length(args...), SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type make(typename copied_type::size_type size, Args&&... args) { typedef sprout::detail::string_construct_access access_type; - return access_type::raw_construct(size, sprout::forward(args)...); + return access_type::raw_construct(size, SPROUT_FORWARD(Args, args)...); } }; } // namespace detail diff --git a/sprout/string/to_string_array.hpp b/sprout/string/to_string_array.hpp index f0e77125..30c699ac 100644 --- a/sprout/string/to_string_array.hpp +++ b/sprout/string/to_string_array.hpp @@ -22,7 +22,7 @@ namespace sprout { SPROUT_DEPRECATED inline SPROUT_CONSTEXPR sprout::array to_string_array(Types&&... args) { - return sprout::convert_array(sprout::to_string_value(), sprout::forward(args)...); + return sprout::convert_array(sprout::to_string_value(), SPROUT_FORWARD(Types, args)...); } } // namespace sprout diff --git a/sprout/string/to_string_value.hpp b/sprout/string/to_string_value.hpp index 1d83cfa3..bde1b6d4 100644 --- a/sprout/string/to_string_value.hpp +++ b/sprout/string/to_string_value.hpp @@ -25,7 +25,7 @@ namespace sprout { operator()(T&& x) const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::to_string(std::declval()))) { - return sprout::to_string(sprout::forward(x)); + return sprout::to_string(SPROUT_FORWARD(T, x)); } }; } // namespace sprout diff --git a/sprout/sub_array/container.hpp b/sprout/sub_array/container.hpp index 702de688..ea10a5dc 100644 --- a/sprout/sub_array/container.hpp +++ b/sprout/sub_array/container.hpp @@ -60,16 +60,16 @@ namespace sprout { static SPROUT_CONSTEXPR copied_type make(Args&&... args) { return make_impl( - sprout::make(sprout::forward(args)...) + sprout::make(SPROUT_FORWARD(Args, args)...) ); } template static SPROUT_CONSTEXPR copied_type remake(Cont&& cont, typename sprout::container_traits >::difference_type size, Args&&... args) { return remake_impl( - sprout::forward(cont), + SPROUT_FORWARD(Cont, cont), size, - sprout::remake(cont, size, sprout::forward(args)...) + sprout::remake(cont, size, SPROUT_FORWARD(Args, args)...) ); } }; @@ -115,7 +115,7 @@ namespace sprout { template static SPROUT_CONSTEXPR typename internal::type get_internal(Cont&& cont) { - return call(sprout::forward(cont)); + return call(SPROUT_FORWARD(Cont, cont)); } }; } // namespace sprout diff --git a/sprout/tuple/deep_copy.hpp b/sprout/tuple/deep_copy.hpp index 04fce3b4..9785331d 100644 --- a/sprout/tuple/deep_copy.hpp +++ b/sprout/tuple/deep_copy.hpp @@ -24,7 +24,7 @@ namespace sprout { >::copied_type deep_copy(Tuple&& tup) { typedef typename std::remove_reference::type tuple_type; - return sprout::tuples::tuple_construct_traits::deep_copy(sprout::forward(tup)); + return sprout::tuples::tuple_construct_traits::deep_copy(SPROUT_FORWARD(Tuple, tup)); } } // namespace tuples } // namespace sprout diff --git a/sprout/tuple/fused.hpp b/sprout/tuple/fused.hpp index 73ba70cc..4bbbbedb 100644 --- a/sprout/tuple/fused.hpp +++ b/sprout/tuple/fused.hpp @@ -52,7 +52,7 @@ namespace sprout { template SPROUT_CONSTEXPR Result call(Tuple&& t, sprout::index_tuple) const { - return f_(sprout::tuples::get(sprout::forward(t))...); + return f_(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))...); } public: SPROUT_CONSTEXPR fused() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL @@ -67,7 +67,7 @@ namespace sprout { SPROUT_CONSTEXPR typename result::type operator()(Tuple&& t) const { return call::type>( - sprout::forward(t), + SPROUT_FORWARD(Tuple, t), sprout::tuple_indexes::type>::make() ); } diff --git a/sprout/tuple/make.hpp b/sprout/tuple/make.hpp index 24834be9..28205d0b 100644 --- a/sprout/tuple/make.hpp +++ b/sprout/tuple/make.hpp @@ -22,7 +22,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type make(Args&&... args) { return sprout::tuples::tuple_construct_traits::make( - sprout::forward(args)... + SPROUT_FORWARD(Args, args)... ); } } // namespace tuples diff --git a/sprout/tuple/remake.hpp b/sprout/tuple/remake.hpp index 00fca9d8..88b17df7 100644 --- a/sprout/tuple/remake.hpp +++ b/sprout/tuple/remake.hpp @@ -22,8 +22,8 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type remake(Tup&& tup, Args&&... args) { return sprout::tuples::tuple_construct_traits::remake( - sprout::forward(tup), - sprout::forward(args)... + SPROUT_FORWARD(Tup, tup), + SPROUT_FORWARD(Args, args)... ); } } // namespace tuples diff --git a/sprout/tuple/traits.hpp b/sprout/tuple/traits.hpp index 18459c80..91278d61 100644 --- a/sprout/tuple/traits.hpp +++ b/sprout/tuple/traits.hpp @@ -66,7 +66,7 @@ namespace sprout { SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type default_make_tuple(Args&&... args) { typedef typename sprout::tuples::tuple_construct_traits::copied_type copied_type; - return copied_type(sprout::forward(args)...); + return copied_type(SPROUT_FORWARD(Args, args)...); } } // namespace detail @@ -80,11 +80,11 @@ namespace sprout { public: template static SPROUT_CONSTEXPR copied_type deep_copy(Tup&& tup) { - return sprout::forward(tup); + return SPROUT_FORWARD(Tup, tup); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { - return sprout::tuples::detail::default_make_tuple(sprout::forward(args)...); + return sprout::tuples::detail::default_make_tuple(SPROUT_FORWARD(Args, args)...); } template static SPROUT_CONSTEXPR copied_type remake( @@ -92,7 +92,7 @@ namespace sprout { Args&&... args ) { - return make(sprout::forward(args)...); + return make(SPROUT_FORWARD(Args, args)...); } }; template diff --git a/sprout/tuple/tuple/get.hpp b/sprout/tuple/tuple/get.hpp index 86c9a927..e7ff9039 100644 --- a/sprout/tuple/tuple/get.hpp +++ b/sprout/tuple/tuple/get.hpp @@ -44,9 +44,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type&& tuple_get(sprout::tuples::tuple&& t) SPROUT_NOEXCEPT { - return sprout::forward >::type>( - sprout::tuples::tuple_get(t) - ); + typedef typename sprout::tuples::tuple_element >::type type; + return SPROUT_FORWARD(type, sprout::tuples::tuple_get(t)); } template inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element >::type const& @@ -96,7 +95,7 @@ namespace sprout_tuple_detail { call_tuple_get(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(tuple_get(std::declval()))) { - return tuple_get(sprout::forward(t)); + return tuple_get(SPROUT_FORWARD(T, t)); } } // namespace sprout_tuple_detail @@ -116,7 +115,7 @@ namespace sprout { get(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout_tuple_detail::call_tuple_get(std::declval()))) { - return sprout_tuple_detail::call_tuple_get(sprout::forward(t)); + return sprout_tuple_detail::call_tuple_get(SPROUT_FORWARD(T, t)); } } // namespace tuples diff --git a/sprout/tuple/tuple/make_tuple.hpp b/sprout/tuple/tuple/make_tuple.hpp index 051ab99e..e6617b5a 100644 --- a/sprout/tuple/tuple/make_tuple.hpp +++ b/sprout/tuple/tuple/make_tuple.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::tuples::tuple::type>::type...> make_tuple(Types&&... args) { - return sprout::tuples::tuple::type...>(sprout::forward(args)...); + return sprout::tuples::tuple::type...>(SPROUT_FORWARD(Types, args)...); } // @@ -34,7 +34,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::tuples::tuple forward_as_tuple(Types&&... args) SPROUT_NOEXCEPT { - return sprout::tuples::tuple(sprout::forward(args)...); + return sprout::tuples::tuple(SPROUT_FORWARD(Types, args)...); } // @@ -124,7 +124,7 @@ namespace sprout { template static SPROUT_CONSTEXPR Result call(Args&&... args) { - return Result(sprout::forward(args)...); + return Result(SPROUT_FORWARD(Args, args)...); } }; template @@ -138,8 +138,8 @@ namespace sprout { typename sprout::tuples::detail::tuple_cat_1st_indexes::type, Tail... >::call( - sprout::forward(args)..., - sprout::tuples::get(sprout::forward(t))... + SPROUT_FORWARD(Args, args)..., + sprout::tuples::get(SPROUT_FORWARD(T, t))... ); } }; @@ -154,7 +154,7 @@ namespace sprout { typename sprout::tuples::results::tuple_cat::type, typename sprout::tuples::detail::tuple_cat_1st_indexes::type, Tuples... - >::call(sprout::forward(tuples)...); + >::call(SPROUT_FORWARD(Tuples, tuples)...); } } // namespace tuples diff --git a/sprout/tuple/tuple/tuple.hpp b/sprout/tuple/tuple/tuple.hpp index 0a16438a..7e08771e 100644 --- a/sprout/tuple/tuple/tuple.hpp +++ b/sprout/tuple/tuple/tuple.hpp @@ -34,7 +34,7 @@ namespace sprout { typename > inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::pair&& t) - : impl_type(sprout::forward::first_type>(t.first), sprout::forward::second_type>(t.second)) + : impl_type(SPROUT_FORWARD(UType1, t.first), SPROUT_FORWARD(UType2, t.second)) {} template @@ -51,7 +51,7 @@ namespace sprout { typename > inline SPROUT_CONSTEXPR sprout::tuples::tuple::tuple(sprout::tuples::flexibly_construct_t, sprout::pair&& t) - : impl_type(sprout::forward::first_type>(t.first), sprout::forward::second_type>(t.second)) + : impl_type(SPROUT_FORWARD(UType1, t.first), SPROUT_FORWARD(UType2, t.second)) {} } // namespace tuples } // namespace sprout diff --git a/sprout/tuple/tuple/tuple_decl.hpp b/sprout/tuple/tuple/tuple_decl.hpp index 4c96032f..56ba143d 100644 --- a/sprout/tuple/tuple/tuple_decl.hpp +++ b/sprout/tuple/tuple/tuple_decl.hpp @@ -52,7 +52,7 @@ namespace sprout { // {} // template // explicit SPROUT_CONSTEXPR head_base(UHead&& v) -// : Head(sprout::forward(v)) +// : Head(SPROUT_FORWARD(UHead, v)) // {} // }; template @@ -75,7 +75,7 @@ namespace sprout { {} template explicit SPROUT_CONSTEXPR head_base(UHead&& v) - : head_(sprout::forward(v)) + : head_(SPROUT_FORWARD(UHead, v)) {} }; template @@ -98,7 +98,7 @@ namespace sprout { {} template explicit SPROUT_CONSTEXPR head_base(UHead&& v) - : head_(sprout::forward(v)) + : head_(SPROUT_FORWARD(UHead, v)) {} }; @@ -185,8 +185,8 @@ namespace sprout { {} template explicit SPROUT_CONSTEXPR tuple_impl(UHead&& h, UTail&&... tail) - : inherited_type(sprout::forward(tail)...) - , base_type(sprout::forward(h)) + : inherited_type(SPROUT_FORWARD(UTail, tail)...) + , base_type(SPROUT_FORWARD(UHead, h)) {} tuple_impl(tuple_impl const&) = default; #if SPROUT_GCC_IN_RANGE((4, 8, 0), (4, 8, 2)) @@ -195,7 +195,7 @@ namespace sprout { SPROUT_CONSTEXPR tuple_impl(tuple_impl&& t) SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_constructible::value && std::is_nothrow_move_constructible::value) : inherited_type(sprout::move(tail(t))) - , base_type(sprout::forward(head(t))) + , base_type(SPROUT_FORWARD(Head, head(t))) {} #endif template @@ -206,7 +206,7 @@ namespace sprout { template SPROUT_CONSTEXPR tuple_impl(tuple_impl&& t) : inherited_type(sprout::move(sprout::tuples::detail::tuple_impl::tail(t))) - , base_type(sprout::forward(sprout::tuples::detail::tuple_impl::head(t))) + , base_type(SPROUT_FORWARD(UHead, (sprout::tuples::detail::tuple_impl::head(t)))) {} SPROUT_CONSTEXPR tuple_impl(tuple_impl const&) : inherited_type() @@ -224,7 +224,7 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR tuple_impl& operator=(tuple_impl&& t) SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_assignable::value && std::is_nothrow_move_assignable::value) { - head(*this) = sprout::forward(head(t)); + head(*this) = SPROUT_FORWARD(Head, head(t)); tail(*this) = sprout::move(tail(t)); return *this; } @@ -236,7 +236,7 @@ namespace sprout { } template SPROUT_CXX14_CONSTEXPR tuple_impl& operator=(sprout::tuples::detail::tuple_impl&& t) { - head(*this) = sprout::forward(sprout::tuples::detail::tuple_impl::head(t)); + head(*this) = SPROUT_FORWARD(UHead, (sprout::tuples::detail::tuple_impl::head(t))); tail(*this) = sprout::move(sprout::tuples::detail::tuple_impl::tail(t)); return *this; } @@ -319,7 +319,7 @@ namespace sprout { >::type > explicit SPROUT_CONSTEXPR tuple(UTypes&&... elements) - : impl_type(sprout::forward(elements)...) + : impl_type(SPROUT_FORWARD(UTypes, elements)...) {} tuple(tuple const&) = default; tuple(tuple&&) = default; @@ -363,7 +363,7 @@ namespace sprout { >::type > explicit SPROUT_CONSTEXPR tuple(sprout::tuples::flexibly_construct_t, UTypes&&... elements) - : impl_type(sprout::forward(elements)...) + : impl_type(SPROUT_FORWARD(UTypes, elements)...) {} template< typename... UTypes, diff --git a/sprout/utility/as_const.hpp b/sprout/utility/as_const.hpp index 8c1f1d07..365005e3 100644 --- a/sprout/utility/as_const.hpp +++ b/sprout/utility/as_const.hpp @@ -23,7 +23,7 @@ namespace sprout { typename std::remove_reference::type const&& >::type as_const(T&& t) { - return sprout::forward(t); + return SPROUT_FORWARD(T, t); } } // namespace sprout diff --git a/sprout/utility/exchange.hpp b/sprout/utility/exchange.hpp index bde73c8d..a8af9ab4 100644 --- a/sprout/utility/exchange.hpp +++ b/sprout/utility/exchange.hpp @@ -20,7 +20,7 @@ namespace sprout { inline SPROUT_CXX14_CONSTEXPR T exchange(T& obj, U&& new_val) { T old_val = sprout::move(obj); - obj = sprout::forward(new_val); + obj = SPROUT_FORWARD(U, new_val); return old_val; } } // namespace sprout diff --git a/sprout/utility/forward.hpp b/sprout/utility/forward.hpp index 5679be9e..be6c90a4 100644 --- a/sprout/utility/forward.hpp +++ b/sprout/utility/forward.hpp @@ -25,4 +25,15 @@ namespace sprout { forward(typename std::remove_reference::type&&) SPROUT_NOEXCEPT SPROUT_DELETED_FUNCTION_DECL } // namespace sprout +// +// SPROUT_FORWARD +// +#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +# define SPROUT_FORWARD(TYPE, VALUE) \ + static_cast(VALUE))>(VALUE) +#else +# define SPROUT_FORWARD(TYPE, VALUE) \ + ::sprout::forward(VALUE) +#endif + #endif // #ifndef SPROUT_UTILITY_FORWARD_HPP diff --git a/sprout/utility/lvalue_forward.hpp b/sprout/utility/lvalue_forward.hpp index de90b6a5..ce8f3aec 100644 --- a/sprout/utility/lvalue_forward.hpp +++ b/sprout/utility/lvalue_forward.hpp @@ -21,7 +21,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::lvalue_reference::type lvalue_forward(typename std::remove_reference::type& t) { - return sprout::as_lvalue(sprout::forward(t)); + return sprout::as_lvalue(SPROUT_FORWARD(T, t)); } template inline SPROUT_CONSTEXPR typename sprout::lvalue_reference::type diff --git a/sprout/utility/pack.hpp b/sprout/utility/pack.hpp index f208a081..f53a2ffe 100644 --- a/sprout/utility/pack.hpp +++ b/sprout/utility/pack.hpp @@ -43,7 +43,7 @@ namespace sprout { template static SPROUT_CONSTEXPR Head&& eval(Args&&..., Head&& head, Tail&&...) { - return sprout::forward(head); + return SPROUT_FORWARD(Head, head); } }; } // namespace detail @@ -52,7 +52,7 @@ namespace sprout { pack_get(Args&&... args) { return sprout::detail::pack_get_helper< typename sprout::types::detail::tuple_take >::type - >::eval(sprout::forward(args)...); + >::eval(SPROUT_FORWARD(Args, args)...); } } // namespace sprout diff --git a/sprout/utility/pair/first.hpp b/sprout/utility/pair/first.hpp index f4120114..29a89ed6 100644 --- a/sprout/utility/pair/first.hpp +++ b/sprout/utility/pair/first.hpp @@ -20,10 +20,10 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto first(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<0>(sprout::forward(t)))) - -> decltype(sprout::tuples::get<0>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<0>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::tuples::get<0>(SPROUT_FORWARD(T, t))) { - return sprout::tuples::get<0>(sprout::forward(t)); + return sprout::tuples::get<0>(SPROUT_FORWARD(T, t)); } } // namespace sprout diff --git a/sprout/utility/pair/make_pair.hpp b/sprout/utility/pair/make_pair.hpp index 11ca0b07..49e2d64f 100644 --- a/sprout/utility/pair/make_pair.hpp +++ b/sprout/utility/pair/make_pair.hpp @@ -27,8 +27,8 @@ namespace sprout { typename sprout::strip_reference::type>::type, typename sprout::strip_reference::type>::type >( - sprout::forward(x), - sprout::forward(y) + SPROUT_FORWARD(T1, x), + SPROUT_FORWARD(T2, y) ); } } // namespace sprout diff --git a/sprout/utility/pair/pair.hpp b/sprout/utility/pair/pair.hpp index 400449af..22619a2d 100644 --- a/sprout/utility/pair/pair.hpp +++ b/sprout/utility/pair/pair.hpp @@ -63,8 +63,8 @@ namespace sprout { typename > inline SPROUT_CONSTEXPR sprout::pair::pair(sprout::tuples::tuple&& other) - : first(sprout::forward(sprout::tuples::get<0>(other))) - , second(sprout::forward(sprout::tuples::get<1>(other))) + : first(SPROUT_FORWARD(U, sprout::tuples::get<0>(other))) + , second(SPROUT_FORWARD(V, sprout::tuples::get<1>(other))) {} template @@ -83,8 +83,8 @@ namespace sprout { typename > inline SPROUT_CXX14_CONSTEXPR sprout::pair& sprout::pair::operator=(sprout::tuples::tuple&& rhs) { - first = sprout::forward(sprout::tuples::get<0>(rhs)); - second = sprout::forward(sprout::tuples::get<1>(rhs)); + first = SPROUT_FORWARD(U, sprout::tuples::get<0>(rhs)); + second = SPROUT_FORWARD(V, sprout::tuples::get<1>(rhs)); return *this; } } // namespace sprout diff --git a/sprout/utility/pair/pair_decl.hpp b/sprout/utility/pair/pair_decl.hpp index a6ffaff5..1e164eff 100644 --- a/sprout/utility/pair/pair_decl.hpp +++ b/sprout/utility/pair/pair_decl.hpp @@ -53,8 +53,8 @@ namespace sprout { >::type > SPROUT_CONSTEXPR pair(U&& x, V&& y) - : first(sprout::forward(x)) - , second(sprout::forward(y)) + : first(SPROUT_FORWARD(U, x)) + , second(SPROUT_FORWARD(V, y)) {} template< typename U, typename V, @@ -73,8 +73,8 @@ namespace sprout { >::type > SPROUT_CONSTEXPR pair(sprout::pair&& other) - : first(sprout::forward(other.first)) - , second(sprout::forward(other.second)) + : first(SPROUT_FORWARD(U, other.first)) + , second(SPROUT_FORWARD(V, other.second)) {} template< typename... Args1, typename... Args2, @@ -110,8 +110,8 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR pair& operator=(pair&& rhs) SPROUT_NOEXCEPT_EXPR(std::is_nothrow_move_assignable::value && std::is_nothrow_move_assignable::value) { - first = sprout::forward(rhs.first); - second = sprout::forward(rhs.second); + first = SPROUT_FORWARD(T1, rhs.first); + second = SPROUT_FORWARD(T2, rhs.second); return *this; } template< @@ -132,8 +132,8 @@ namespace sprout { >::type > SPROUT_CXX14_CONSTEXPR pair& operator=(sprout::pair&& rhs) { - first = sprout::forward(rhs.first); - second = sprout::forward(rhs.second); + first = SPROUT_FORWARD(U, rhs.first); + second = SPROUT_FORWARD(V, rhs.second); return *this; } template< diff --git a/sprout/utility/pair/second.hpp b/sprout/utility/pair/second.hpp index 5b8da543..57084b1e 100644 --- a/sprout/utility/pair/second.hpp +++ b/sprout/utility/pair/second.hpp @@ -20,10 +20,10 @@ namespace sprout { template inline SPROUT_CONSTEXPR auto second(T&& t) - SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<1>(sprout::forward(t)))) - -> decltype(sprout::tuples::get<1>(sprout::forward(t))) + SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<1>(SPROUT_FORWARD(T, t)))) + -> decltype(sprout::tuples::get<1>(SPROUT_FORWARD(T, t))) { - return sprout::tuples::get<1>(sprout::forward(t)); + return sprout::tuples::get<1>(SPROUT_FORWARD(T, t)); } } // namespace sprout diff --git a/sprout/utility/value_holder/value_holder.hpp b/sprout/utility/value_holder/value_holder.hpp index a66720d9..deea2dad 100644 --- a/sprout/utility/value_holder/value_holder.hpp +++ b/sprout/utility/value_holder/value_holder.hpp @@ -225,14 +225,14 @@ namespace sprout { typename = typename std::enable_if::value>::type > explicit SPROUT_CONSTEXPR value_holder(sprout::in_place_t, Args&&... args) - : holder_(sprout::forward(args)...) + : holder_(SPROUT_FORWARD(Args, args)...) {} template< typename U, typename... Args, typename = typename std::enable_if&, Args...>::value>::type > explicit SPROUT_CONSTEXPR value_holder(sprout::in_place_t, std::initializer_list il, Args&&... args) - : holder_(il, sprout::forward(args)...) + : holder_(il, SPROUT_FORWARD(Args, args)...) {} SPROUT_CXX14_CONSTEXPR value_holder& operator=(value_holder const& rhs) { diff --git a/sprout/variant/apply_visitor.hpp b/sprout/variant/apply_visitor.hpp index 499f35fb..9e536adf 100644 --- a/sprout/variant/apply_visitor.hpp +++ b/sprout/variant/apply_visitor.hpp @@ -23,7 +23,7 @@ namespace sprout { typename std::remove_reference::type >::type apply_visitor(Visitor&& visitor, Visitable&& visitable) { - return sprout::forward(visitable).apply_visitor(sprout::forward(visitor)); + return SPROUT_FORWARD(Visitable, visitable).apply_visitor(SPROUT_FORWARD(Visitor, visitor)); } } // namespace sprout diff --git a/sprout/variant/as_variant_visitor.hpp b/sprout/variant/as_variant_visitor.hpp index 6e7c093d..db23157a 100644 --- a/sprout/variant/as_variant_visitor.hpp +++ b/sprout/variant/as_variant_visitor.hpp @@ -36,9 +36,9 @@ namespace sprout { {} template SPROUT_CONSTEXPR auto operator()(T&& t) const - -> decltype(std::declval().get()(sprout::forward(t))) + -> decltype(std::declval().get()(SPROUT_FORWARD(T, t))) { - return v_.get()(sprout::forward(t)); + return v_.get()(SPROUT_FORWARD(T, t)); } }; diff --git a/sprout/variant/as_visitor.hpp b/sprout/variant/as_visitor.hpp index 5567c6cb..5c7dad5e 100644 --- a/sprout/variant/as_visitor.hpp +++ b/sprout/variant/as_visitor.hpp @@ -62,9 +62,9 @@ namespace sprout { {} template SPROUT_CONSTEXPR auto operator()(T&& t) const - -> decltype(std::declval().get()(sprout::forward(t))) + -> decltype(std::declval().get()(SPROUT_FORWARD(T, t))) { - return v_.get()(sprout::forward(t)); + return v_.get()(SPROUT_FORWARD(T, t)); } }; diff --git a/sprout/variant/variant.hpp b/sprout/variant/variant.hpp index b4c4f26f..8d99ceac 100644 --- a/sprout/variant/variant.hpp +++ b/sprout/variant/variant.hpp @@ -44,7 +44,7 @@ namespace sprout { return sprout::tuples::make( sprout::tuples::flexibly_construct, typename sprout::tuples::tuple_element::type()..., - sprout::forward(operand) + SPROUT_FORWARD(T, operand) ); } protected: @@ -57,7 +57,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR variant_impl(T&& operand, Index) - : tuple_(init(sprout::forward(operand), sprout::make_index_tuple::make())) + : tuple_(init(SPROUT_FORWARD(T, operand), sprout::make_index_tuple::make())) , which_(Index::value) { static_assert(Index::value < sizeof...(Types), "variant<>: invalid operand"); @@ -208,7 +208,7 @@ namespace sprout { I == sizeof...(Types) - 1, Result >::type visit(Tuple&& t, Visitor&& v, int) { - return sprout::forward(v)(sprout::tuples::get(sprout::forward(t))); + return SPROUT_FORWARD(Visitor, v)(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))); } template static SPROUT_CONSTEXPR typename std::enable_if< @@ -216,8 +216,8 @@ namespace sprout { Result >::type visit(Tuple&& t, Visitor&& v, int which) { return I == which - ? sprout::forward(v)(sprout::tuples::get(sprout::forward(t))) - : visit(sprout::forward(t), sprout::forward(v), which) + ? SPROUT_FORWARD(Visitor, v)(sprout::tuples::get(SPROUT_FORWARD(Tuple, t))) + : visit(SPROUT_FORWARD(Tuple, t), SPROUT_FORWARD(Visitor, v), which) ; } private: @@ -233,7 +233,7 @@ namespace sprout { template SPROUT_CONSTEXPR variant(T&& operand) : impl_type( - sprout::forward(operand), + SPROUT_FORWARD(T, operand), sprout::types::find_index::type>() ) {} @@ -255,7 +255,7 @@ namespace sprout { } template SPROUT_CXX14_CONSTEXPR variant& operator=(T&& rhs) { - static_cast(*this) = variant(sprout::forward(rhs)); + static_cast(*this) = variant(SPROUT_FORWARD(T, rhs)); return *this; } // queries @@ -330,7 +330,7 @@ namespace sprout { apply_visitor(Visitor&& visitor) const { typedef typename visitor_result::type, variant const>::type result_type; return SPROUT_ASSERT(0 <= which_ && sprout::math::less(which_, sizeof...(Types))), - visit(tuple_, sprout::forward(visitor), which_) + visit(tuple_, SPROUT_FORWARD(Visitor, visitor), which_) ; } template @@ -338,7 +338,7 @@ namespace sprout { apply_visitor(Visitor&& visitor) { typedef typename visitor_result::type, variant>::type result_type; return SPROUT_ASSERT(0 <= which_ && sprout::math::less(which_, sizeof...(Types))), - visit(tuple_, sprout::forward(visitor), which_) + visit(tuple_, SPROUT_FORWARD(Visitor, visitor), which_) ; } }; diff --git a/sprout/weed/expr/expr.hpp b/sprout/weed/expr/expr.hpp index 81773891..44093dfc 100644 --- a/sprout/weed/expr/expr.hpp +++ b/sprout/weed/expr/expr.hpp @@ -30,7 +30,7 @@ namespace sprout { public: template explicit SPROUT_CONSTEXPR expr(As&&... args) - : args_(sprout::forward(args)...) + : args_(SPROUT_FORWARD(As, args)...) {} SPROUT_CONSTEXPR args_type const& args() const { return args_; diff --git a/sprout/weed/expr/make_expr.hpp b/sprout/weed/expr/make_expr.hpp index be99ef7f..423a5f80 100644 --- a/sprout/weed/expr/make_expr.hpp +++ b/sprout/weed/expr/make_expr.hpp @@ -23,7 +23,7 @@ namespace sprout { inline SPROUT_CONSTEXPR typename sprout::weed::traits::expr_of::type make_expr(Args&&... args) { return typename sprout::weed::traits::expr_of::type( - sprout::weed::make_terminal_or_expr(sprout::forward(args))... + sprout::weed::make_terminal_or_expr(SPROUT_FORWARD(Args, args))... ); } } // namespace weed diff --git a/sprout/weed/expr/make_terminal.hpp b/sprout/weed/expr/make_terminal.hpp index fa37abba..df26d4d2 100644 --- a/sprout/weed/expr/make_terminal.hpp +++ b/sprout/weed/expr/make_terminal.hpp @@ -28,7 +28,7 @@ namespace sprout { typename sprout::weed::traits::terminal_of::type >::type make_terminal(Arg&& arg) { return typename sprout::weed::traits::terminal_of::type( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } template @@ -39,7 +39,7 @@ namespace sprout { typename sprout::weed::traits::terminal_of::type >::type make_terminal(Arg&& arg) { return typename sprout::weed::traits::terminal_of::type( - sprout::to_string(sprout::forward(arg)) + sprout::to_string(SPROUT_FORWARD(Arg, arg)) ); } } // namespace weed diff --git a/sprout/weed/expr/make_terminal_or_expr.hpp b/sprout/weed/expr/make_terminal_or_expr.hpp index c9fdb4be..9171ddce 100644 --- a/sprout/weed/expr/make_terminal_or_expr.hpp +++ b/sprout/weed/expr/make_terminal_or_expr.hpp @@ -27,7 +27,7 @@ namespace sprout { >::value, typename sprout::weed::traits::terminal_or_expr_of::type >::type make_terminal_or_expr(Arg&& arg) { - return sprout::forward(arg); + return SPROUT_FORWARD(Arg, arg); } template inline SPROUT_CONSTEXPR typename std::enable_if< @@ -36,7 +36,7 @@ namespace sprout { >::value, typename sprout::weed::traits::terminal_or_expr_of::type >::type make_terminal_or_expr(Arg&& arg) { - return sprout::weed::make_terminal(sprout::forward(arg)); + return sprout::weed::make_terminal(SPROUT_FORWARD(Arg, arg)); } } // namespace weed } // namespace sprout diff --git a/sprout/weed/operator/address_of.hpp b/sprout/weed/operator/address_of.hpp index 7836a889..8ab8a2bc 100644 --- a/sprout/weed/operator/address_of.hpp +++ b/sprout/weed/operator/address_of.hpp @@ -34,7 +34,7 @@ namespace sprout { Arg >::type operator&(Arg&& arg) { return sprout::weed::make_expr( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } } // namespace weed diff --git a/sprout/weed/operator/bitwise_or.hpp b/sprout/weed/operator/bitwise_or.hpp index f493e966..a1eca100 100644 --- a/sprout/weed/operator/bitwise_or.hpp +++ b/sprout/weed/operator/bitwise_or.hpp @@ -39,8 +39,8 @@ namespace sprout { Arg2 >::type operator|(Arg1&& arg1, Arg2&& arg2) { return sprout::weed::make_expr( - sprout::forward(arg1), - sprout::forward(arg2) + SPROUT_FORWARD(Arg1, arg1), + SPROUT_FORWARD(Arg2, arg2) ); } } // namespace weed diff --git a/sprout/weed/operator/dereference.hpp b/sprout/weed/operator/dereference.hpp index 5b2c7662..9ced1556 100644 --- a/sprout/weed/operator/dereference.hpp +++ b/sprout/weed/operator/dereference.hpp @@ -34,7 +34,7 @@ namespace sprout { Arg >::type operator*(Arg&& arg) { return sprout::weed::make_expr( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } } // namespace weed diff --git a/sprout/weed/operator/logical_not.hpp b/sprout/weed/operator/logical_not.hpp index aa11a809..f41266fe 100644 --- a/sprout/weed/operator/logical_not.hpp +++ b/sprout/weed/operator/logical_not.hpp @@ -34,7 +34,7 @@ namespace sprout { Arg >::type operator!(Arg&& arg) { return sprout::weed::make_expr( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } } // namespace weed diff --git a/sprout/weed/operator/mem_ptr.hpp b/sprout/weed/operator/mem_ptr.hpp index 59dc7c79..853b27c0 100644 --- a/sprout/weed/operator/mem_ptr.hpp +++ b/sprout/weed/operator/mem_ptr.hpp @@ -36,8 +36,8 @@ namespace sprout { Arg2 >::type operator->*(Arg1&& arg1, Arg2&& arg2) { return sprout::weed::make_expr( - sprout::forward(arg1), - sprout::forward(arg2) + SPROUT_FORWARD(Arg1, arg1), + SPROUT_FORWARD(Arg2, arg2) ); } } // namespace weed diff --git a/sprout/weed/operator/minus.hpp b/sprout/weed/operator/minus.hpp index c14a9304..cc50af9e 100644 --- a/sprout/weed/operator/minus.hpp +++ b/sprout/weed/operator/minus.hpp @@ -39,8 +39,8 @@ namespace sprout { Arg2 >::type operator-(Arg1&& arg1, Arg2&& arg2) { return sprout::weed::make_expr( - sprout::forward(arg1), - sprout::forward(arg2) + SPROUT_FORWARD(Arg1, arg1), + SPROUT_FORWARD(Arg2, arg2) ); } } // namespace weed diff --git a/sprout/weed/operator/modulus.hpp b/sprout/weed/operator/modulus.hpp index d4ede51d..0906facf 100644 --- a/sprout/weed/operator/modulus.hpp +++ b/sprout/weed/operator/modulus.hpp @@ -39,8 +39,8 @@ namespace sprout { Arg2 >::type operator%(Arg1&& arg1, Arg2&& arg2) { return sprout::weed::make_expr( - sprout::forward(arg1), - sprout::forward(arg2) + SPROUT_FORWARD(Arg1, arg1), + SPROUT_FORWARD(Arg2, arg2) ); } } // namespace weed diff --git a/sprout/weed/operator/negate.hpp b/sprout/weed/operator/negate.hpp index 3b06c212..de79f2d6 100644 --- a/sprout/weed/operator/negate.hpp +++ b/sprout/weed/operator/negate.hpp @@ -34,7 +34,7 @@ namespace sprout { Arg >::type operator-(Arg&& arg) { return sprout::weed::make_expr( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } } // namespace weed diff --git a/sprout/weed/operator/shift_left.hpp b/sprout/weed/operator/shift_left.hpp index 8a51658e..1bdf81a9 100644 --- a/sprout/weed/operator/shift_left.hpp +++ b/sprout/weed/operator/shift_left.hpp @@ -39,8 +39,8 @@ namespace sprout { Arg2 >::type operator>>(Arg1&& arg1, Arg2&& arg2) { return sprout::weed::make_expr( - sprout::forward(arg1), - sprout::forward(arg2) + SPROUT_FORWARD(Arg1, arg1), + SPROUT_FORWARD(Arg2, arg2) ); } } // namespace weed diff --git a/sprout/weed/operator/unary_plus.hpp b/sprout/weed/operator/unary_plus.hpp index 025b7e17..01a3fb84 100644 --- a/sprout/weed/operator/unary_plus.hpp +++ b/sprout/weed/operator/unary_plus.hpp @@ -34,7 +34,7 @@ namespace sprout { Arg >::type operator+(Arg&& arg) { return sprout::weed::make_expr( - sprout::forward(arg) + SPROUT_FORWARD(Arg, arg) ); } } // namespace weed diff --git a/sprout/weed/parser/lit.hpp b/sprout/weed/parser/lit.hpp index aedeadc7..3a89d44d 100644 --- a/sprout/weed/parser/lit.hpp +++ b/sprout/weed/parser/lit.hpp @@ -28,7 +28,7 @@ namespace sprout { >::result_type operator()(T&& t) const { typedef eval::type> eval_type; - return eval_type()(sprout::forward(t)); + return eval_type()(SPROUT_FORWARD(T, t)); } }; // diff --git a/sprout/workaround/recursive_function_template.hpp b/sprout/workaround/recursive_function_template.hpp index a0477777..e3a5ed39 100644 --- a/sprout/workaround/recursive_function_template.hpp +++ b/sprout/workaround/recursive_function_template.hpp @@ -75,7 +75,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR T&& throw_recursive_function_template_instantiation_exeeded(T&& t) { - return throw sprout::recursive_function_template_instantiation_exeeded(), sprout::forward(t); + return throw sprout::recursive_function_template_instantiation_exeeded(), SPROUT_FORWARD(T, t); } } // namespace sprout diff --git a/testspr/range.hpp b/testspr/range.hpp index 84baa330..d7a73849 100644 --- a/testspr/range.hpp +++ b/testspr/range.hpp @@ -90,7 +90,7 @@ namespace testspr { std::input_iterator_tag > reduct_input(Range&& rng) { - return testspr::range::make_reduct_range(sprout::forward(rng)); + return testspr::range::make_reduct_range(SPROUT_FORWARD(Range, rng)); } template inline SPROUT_CONSTEXPR testspr::range::reducted_range< @@ -98,7 +98,7 @@ namespace testspr { std::forward_iterator_tag > reduct_forward(Range&& rng) { - return testspr::range::make_reduct_range(sprout::forward(rng)); + return testspr::range::make_reduct_range(SPROUT_FORWARD(Range, rng)); } template inline SPROUT_CONSTEXPR testspr::range::reducted_range< @@ -106,7 +106,7 @@ namespace testspr { std::bidirectional_iterator_tag > reduct_bidirectional(Range&& rng) { - return testspr::range::make_reduct_range(sprout::forward(rng)); + return testspr::range::make_reduct_range(SPROUT_FORWARD(Range, rng)); } template inline SPROUT_CONSTEXPR testspr::range::reducted_range< @@ -114,7 +114,7 @@ namespace testspr { std::random_access_iterator_tag > reduct_random_access(Range&& rng) { - return testspr::range::make_reduct_range(sprout::forward(rng)); + return testspr::range::make_reduct_range(SPROUT_FORWARD(Range, rng)); } } // namespace range } // namespace testspr