diff --git a/sprout/algorithm/adjacent_find.hpp b/sprout/algorithm/adjacent_find.hpp index c144dfeb..dcc3d32e 100644 --- a/sprout/algorithm/adjacent_find.hpp +++ b/sprout/algorithm/adjacent_find.hpp @@ -20,7 +20,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR RandomAccessIterator - adjacent_find_impl_check_ra(RandomAccessIterator found, RandomAccessIterator last) { + adjacent_find_impl_check_ra(RandomAccessIterator const& found, RandomAccessIterator const& last) { return sprout::distance(found, last) == 1 ? last : found ; @@ -28,8 +28,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator adjacent_find_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -51,7 +51,7 @@ namespace sprout { RandomAccessIterator >::type adjacent_find( - RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, std::random_access_iterator_tag* ) { @@ -68,7 +68,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator - adjacent_find_impl_check(ForwardIterator found, ForwardIterator last) { + adjacent_find_impl_check(ForwardIterator const& found, ForwardIterator const& last) { return sprout::next(found) == last ? last : found ; @@ -77,7 +77,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair adjacent_find_impl_1( sprout::pair const& current, - ForwardIterator last, BinaryPredicate pred, typename std::iterator_traits::difference_type n + ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -98,7 +98,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair adjacent_find_impl( sprout::pair const& current, - ForwardIterator last, BinaryPredicate pred, typename std::iterator_traits::difference_type n + ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { return current.second == last ? current @@ -114,7 +114,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator adjacent_find( - ForwardIterator first, ForwardIterator last, BinaryPredicate pred, + ForwardIterator const& first, ForwardIterator const& last, BinaryPredicate pred, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/all_of.hpp b/sprout/algorithm/all_of.hpp index bbf83ef1..1251e692 100644 --- a/sprout/algorithm/all_of.hpp +++ b/sprout/algorithm/all_of.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool all_of_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type all_of( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair all_of_impl_1( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair all_of_impl( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return !current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool all_of( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/all_of_equal.hpp b/sprout/algorithm/all_of_equal.hpp index 2fb7302b..7a067543 100644 --- a/sprout/algorithm/all_of_equal.hpp +++ b/sprout/algorithm/all_of_equal.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool all_of_equal_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type all_of_equal( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair all_of_equal_impl_1( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair all_of_equal_impl( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return !current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool all_of_equal( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/any_of.hpp b/sprout/algorithm/any_of.hpp index 18d8d96f..c9ecd30d 100644 --- a/sprout/algorithm/any_of.hpp +++ b/sprout/algorithm/any_of.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool any_of_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type any_of( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair any_of_impl_1( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair any_of_impl( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool any_of( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/any_of_equal.hpp b/sprout/algorithm/any_of_equal.hpp index 7171e141..c1abcf8e 100644 --- a/sprout/algorithm/any_of_equal.hpp +++ b/sprout/algorithm/any_of_equal.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool any_of_equal_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type any_of_equal( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair any_of_equal_impl_1( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair any_of_equal_impl( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool any_of_equal( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/binary_search.hpp b/sprout/algorithm/binary_search.hpp index 4e3eda46..2e0e1722 100644 --- a/sprout/algorithm/binary_search.hpp +++ b/sprout/algorithm/binary_search.hpp @@ -17,7 +17,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR bool - binary_search_impl(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { + binary_search_impl(ForwardIterator const& first, ForwardIterator const& last, T const& value, Compare comp) { return (first != last && !comp(value, *first)); } } // namespace detail diff --git a/sprout/algorithm/count.hpp b/sprout/algorithm/count.hpp index 45dfebf8..966bedaa 100644 --- a/sprout/algorithm/count.hpp +++ b/sprout/algorithm/count.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count_impl_ra( - RandomAccessIterator first, T const& value, + RandomAccessIterator const& first, T const& value, typename std::iterator_traits::difference_type size ) { @@ -41,7 +41,7 @@ namespace sprout { typename std::iterator_traits::difference_type >::type count( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> count_impl_1( sprout::pair::difference_type> const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair::difference_type> type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> count_impl( sprout::pair::difference_type> const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/count_if.hpp b/sprout/algorithm/count_if.hpp index d9c5a2c1..9e4248ce 100644 --- a/sprout/algorithm/count_if.hpp +++ b/sprout/algorithm/count_if.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count_if_impl_ra( - RandomAccessIterator first, Predicate pred, + RandomAccessIterator const& first, Predicate pred, typename std::iterator_traits::difference_type size ) { @@ -41,7 +41,7 @@ namespace sprout { typename std::iterator_traits::difference_type >::type count_if( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> count_if_impl_1( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair::difference_type> type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> count_if_impl( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count_if( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/equal_range.hpp b/sprout/algorithm/equal_range.hpp index c3b88962..b810fcfc 100644 --- a/sprout/algorithm/equal_range.hpp +++ b/sprout/algorithm/equal_range.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::pair equal_range( - ForwardIterator first, typename std::iterator_traits::difference_type len, + ForwardIterator const& first, typename std::iterator_traits::difference_type len, T const& value, Compare comp ) { diff --git a/sprout/algorithm/find.hpp b/sprout/algorithm/find.hpp index e995458b..c15b4439 100644 --- a/sprout/algorithm/find.hpp +++ b/sprout/algorithm/find.hpp @@ -20,8 +20,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator find_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -43,7 +43,7 @@ namespace sprout { RandomAccessIterator >::type find( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -56,7 +56,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_impl_1( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -75,7 +75,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_impl( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR InputIterator find( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/find_if.hpp b/sprout/algorithm/find_if.hpp index 79dd4e7e..322b4e3e 100644 --- a/sprout/algorithm/find_if.hpp +++ b/sprout/algorithm/find_if.hpp @@ -20,8 +20,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator find_if_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -43,7 +43,7 @@ namespace sprout { RandomAccessIterator >::type find_if( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -56,7 +56,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_if_impl_1( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -75,7 +75,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_if_impl( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR InputIterator find_if( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/find_if_not.hpp b/sprout/algorithm/find_if_not.hpp index dacbb228..4e90b70f 100644 --- a/sprout/algorithm/find_if_not.hpp +++ b/sprout/algorithm/find_if_not.hpp @@ -20,8 +20,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator find_if_not_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -43,7 +43,7 @@ namespace sprout { RandomAccessIterator >::type find_if_not( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -56,7 +56,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_if_not_impl_1( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -75,7 +75,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_if_not_impl( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR InputIterator find_if_not( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/fit/clamp_range_copy.hpp b/sprout/algorithm/fit/clamp_range_copy.hpp index b3ffc62c..7fa98109 100644 --- a/sprout/algorithm/fit/clamp_range_copy.hpp +++ b/sprout/algorithm/fit/clamp_range_copy.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type clamp_range_copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp, diff --git a/sprout/algorithm/fit/copy.hpp b/sprout/algorithm/fit/copy.hpp index 31a6463c..7844a59b 100644 --- a/sprout/algorithm/fit/copy.hpp +++ b/sprout/algorithm/fit/copy.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/copy_backward.hpp b/sprout/algorithm/fit/copy_backward.hpp index 1620d9d9..7cd08b56 100644 --- a/sprout/algorithm/fit/copy_backward.hpp +++ b/sprout/algorithm/fit/copy_backward.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_backward_impl( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/copy_if.hpp b/sprout/algorithm/fit/copy_if.hpp index adc48299..ae9e15b3 100644 --- a/sprout/algorithm/fit/copy_if.hpp +++ b/sprout/algorithm/fit/copy_if.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_if_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/copy_n.hpp b/sprout/algorithm/fit/copy_n.hpp index c7bf3cd6..722d1342 100644 --- a/sprout/algorithm/fit/copy_n.hpp +++ b/sprout/algorithm/fit/copy_n.hpp @@ -22,7 +22,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_n_impl( - InputIterator first, Size n, Result const& result, + InputIterator const& first, Size n, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/copy_until.hpp b/sprout/algorithm/fit/copy_until.hpp index bf1f3f17..545a2c2b 100644 --- a/sprout/algorithm/fit/copy_until.hpp +++ b/sprout/algorithm/fit/copy_until.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_until_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/copy_while.hpp b/sprout/algorithm/fit/copy_while.hpp index 021a93c7..c09c8f5e 100644 --- a/sprout/algorithm/fit/copy_while.hpp +++ b/sprout/algorithm/fit/copy_while.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type copy_while_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/partition_copy.hpp b/sprout/algorithm/fit/partition_copy.hpp index 057e6440..ba20a494 100644 --- a/sprout/algorithm/fit/partition_copy.hpp +++ b/sprout/algorithm/fit/partition_copy.hpp @@ -27,7 +27,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type partition_copy_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/remove_copy.hpp b/sprout/algorithm/fit/remove_copy.hpp index 91406f8d..84d3569c 100644 --- a/sprout/algorithm/fit/remove_copy.hpp +++ b/sprout/algorithm/fit/remove_copy.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type remove_copy_impl( - InputIterator first, InputIterator last, Result const& result, T const& value, + InputIterator const& first, InputIterator const& last, Result const& result, T const& value, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/remove_copy_if.hpp b/sprout/algorithm/fit/remove_copy_if.hpp index b62ed981..6056e284 100644 --- a/sprout/algorithm/fit/remove_copy_if.hpp +++ b/sprout/algorithm/fit/remove_copy_if.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type remove_copy_if_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/replace_copy.hpp b/sprout/algorithm/fit/replace_copy.hpp index cfa83ed9..07b9894a 100644 --- a/sprout/algorithm/fit/replace_copy.hpp +++ b/sprout/algorithm/fit/replace_copy.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type replace_copy_impl( - InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value, + InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/replace_copy_if.hpp b/sprout/algorithm/fit/replace_copy_if.hpp index af4b0696..e20faf3d 100644 --- a/sprout/algorithm/fit/replace_copy_if.hpp +++ b/sprout/algorithm/fit/replace_copy_if.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type replace_copy_if_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/reverse_copy.hpp b/sprout/algorithm/fit/reverse_copy.hpp index 95dbc29d..469bfad2 100644 --- a/sprout/algorithm/fit/reverse_copy.hpp +++ b/sprout/algorithm/fit/reverse_copy.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type reverse_copy_impl( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/rotate_copy.hpp b/sprout/algorithm/fit/rotate_copy.hpp index 61d58a6e..72d05e1c 100644 --- a/sprout/algorithm/fit/rotate_copy.hpp +++ b/sprout/algorithm/fit/rotate_copy.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type rotate_copy_impl( - ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/stable_partition_copy.hpp b/sprout/algorithm/fit/stable_partition_copy.hpp index 861ef2f3..68d5426c 100644 --- a/sprout/algorithm/fit/stable_partition_copy.hpp +++ b/sprout/algorithm/fit/stable_partition_copy.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type stable_partition_copy_impl( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, Predicate pred, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/swap_element_copy.hpp b/sprout/algorithm/fit/swap_element_copy.hpp index c9b05d96..a30e6285 100644 --- a/sprout/algorithm/fit/swap_element_copy.hpp +++ b/sprout/algorithm/fit/swap_element_copy.hpp @@ -23,7 +23,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type swap_element_copy_impl( - ForwardIterator first, ForwardIterator last, Result const& result, ForwardIterator pos1, ForwardIterator pos2, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, ForwardIterator const& pos1, ForwardIterator const& pos2, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/transform.hpp b/sprout/algorithm/fit/transform.hpp index 940813b1..45365d3c 100644 --- a/sprout/algorithm/fit/transform.hpp +++ b/sprout/algorithm/fit/transform.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type transform_impl( - InputIterator first, InputIterator last, Result const& result, UnaryOperation op, + InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fit/unique_copy.hpp b/sprout/algorithm/fit/unique_copy.hpp index 469cc23f..5381685a 100644 --- a/sprout/algorithm/fit/unique_copy.hpp +++ b/sprout/algorithm/fit/unique_copy.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type unique_copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { @@ -50,7 +50,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type unique_copy_impl( - InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/fixed/clamp_range_copy.hpp b/sprout/algorithm/fixed/clamp_range_copy.hpp index 454de117..834149f1 100644 --- a/sprout/algorithm/fixed/clamp_range_copy.hpp +++ b/sprout/algorithm/fixed/clamp_range_copy.hpp @@ -31,7 +31,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type clamp_range_copy_impl_ra( - RandomAccessIterator first, RandomAccessIterator, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp, @@ -53,7 +53,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type clamp_range_copy( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp, @@ -91,7 +91,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type clamp_range_copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp, @@ -111,7 +111,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp, @@ -127,7 +127,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp @@ -143,7 +143,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type clamp_range_copy( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename std::iterator_traits::value_type const& low, typename std::iterator_traits::value_type const& high, Compare comp diff --git a/sprout/algorithm/fixed/copy.hpp b/sprout/algorithm/fixed/copy.hpp index 8e63efee..51f2bc8c 100644 --- a/sprout/algorithm/fixed/copy.hpp +++ b/sprout/algorithm/fixed/copy.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_impl_ra( - RandomAccessIterator first, RandomAccessIterator, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -47,7 +47,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -79,7 +79,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) @@ -92,7 +92,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, std::input_iterator_tag* ) { @@ -104,7 +104,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy(InputIterator first, InputIterator last, Result const& result) { + copy(InputIterator const& first, InputIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::copy(first, last, result, category()); } @@ -114,7 +114,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy(InputIterator first, InputIterator last, Result const& result) { + copy(InputIterator const& first, InputIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), first, last diff --git a/sprout/algorithm/fixed/copy_backward.hpp b/sprout/algorithm/fixed/copy_backward.hpp index 1e79dd3a..a3e75b8b 100644 --- a/sprout/algorithm/fixed/copy_backward.hpp +++ b/sprout/algorithm/fixed/copy_backward.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_backward_impl_ra( - RandomAccessIterator, RandomAccessIterator last, Result const& result, + RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -47,7 +47,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_backward( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -78,7 +78,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_backward_impl( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_backward( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, std::bidirectional_iterator_tag* ) { @@ -106,7 +106,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_backward(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { + copy_backward(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::copy_backward(first, last, result, category()); } diff --git a/sprout/algorithm/fixed/copy_if.hpp b/sprout/algorithm/fixed/copy_if.hpp index 14b8b0b7..93147808 100644 --- a/sprout/algorithm/fixed/copy_if.hpp +++ b/sprout/algorithm/fixed/copy_if.hpp @@ -28,7 +28,7 @@ namespace sprout { sprout::container_traits::static_size == sizeof...(Args), typename sprout::fixed::results::algorithm::type >::type - copy_if_impl(InputIterator, InputIterator, Result const& result, Predicate, + copy_if_impl(InputIterator const&, InputIterator const&, Result const& result, Predicate, typename sprout::container_traits::size_type, Args const&... args ) @@ -41,7 +41,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_if_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args ) @@ -59,7 +59,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::fixed::detail::copy_if_impl(first, last, result, pred, sprout::size(result)); } @@ -68,7 +68,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::remake( result, sprout::size(result), sprout::make_filter_iterator(pred, first, last), diff --git a/sprout/algorithm/fixed/copy_n.hpp b/sprout/algorithm/fixed/copy_n.hpp index 2daedde4..87f57662 100644 --- a/sprout/algorithm/fixed/copy_n.hpp +++ b/sprout/algorithm/fixed/copy_n.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_n( - RandomAccessIterator first, Size n, Result const& result, + RandomAccessIterator const& first, Size n, Result const& result, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_n_impl( - InputIterator first, Size n, Result const& result, + InputIterator const& first, Size n, Result const& result, typename sprout::container_traits::difference_type offset, Args const&... args ) @@ -67,7 +67,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_n( - InputIterator first, Size n, Result const& result, + InputIterator const& first, Size n, Result const& result, std::input_iterator_tag* ) { @@ -79,7 +79,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_n(InputIterator first, Size n, Result const& result) { + copy_n(InputIterator const& first, Size n, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::copy_n(first, n, result, category()); } @@ -89,7 +89,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_n(InputIterator first, Size n, Result const& result) { + copy_n(InputIterator const& first, Size n, Result const& result) { static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); return sprout::fixed::copy(first, sprout::next(first, n), result); } diff --git a/sprout/algorithm/fixed/copy_until.hpp b/sprout/algorithm/fixed/copy_until.hpp index 4929704f..1ef66caf 100644 --- a/sprout/algorithm/fixed/copy_until.hpp +++ b/sprout/algorithm/fixed/copy_until.hpp @@ -30,7 +30,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_until( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, Predicate pred, std::random_access_iterator_tag* ) { @@ -56,7 +56,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_until_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args ) @@ -69,7 +69,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_until( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, std::input_iterator_tag* ) { @@ -81,7 +81,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_until(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_until(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::copy_until(first, last, result, pred, category()); } @@ -91,7 +91,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_until(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_until(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::remake( result, sprout::size(result), sprout::make_while_iterator(sprout::not1(pred), first, last), diff --git a/sprout/algorithm/fixed/copy_while.hpp b/sprout/algorithm/fixed/copy_while.hpp index 2da0fb5f..1c3da6b4 100644 --- a/sprout/algorithm/fixed/copy_while.hpp +++ b/sprout/algorithm/fixed/copy_while.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_while( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, Predicate pred, std::random_access_iterator_tag* ) { @@ -55,7 +55,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type copy_while_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args ) @@ -68,7 +68,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type copy_while( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, std::input_iterator_tag* ) { @@ -80,7 +80,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_while(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_while(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::copy_while(first, last, result, pred, category()); } @@ -90,7 +90,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - copy_while(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + copy_while(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::remake( result, sprout::size(result), sprout::make_while_iterator(pred, first, last), diff --git a/sprout/algorithm/fixed/deprecated/sort.hpp b/sprout/algorithm/fixed/deprecated/sort.hpp index e9bc93aa..836ac3b9 100644 --- a/sprout/algorithm/fixed/deprecated/sort.hpp +++ b/sprout/algorithm/fixed/deprecated/sort.hpp @@ -43,7 +43,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type const& sort_select_pivot( - RandomAccessIterator origin, + RandomAccessIterator const& origin, typename sprout::container_traits::difference_type start, typename sprout::container_traits::difference_type end ) @@ -53,7 +53,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type sort_find_l( - RandomAccessIterator origin, + RandomAccessIterator const& origin, Compare comp, typename sprout::container_traits::difference_type l, typename sprout::container_traits::value_type const& p @@ -67,7 +67,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type sort_find_r( - RandomAccessIterator origin, + RandomAccessIterator const& origin, Compare comp, typename sprout::container_traits::difference_type r, typename sprout::container_traits::value_type const& p diff --git a/sprout/algorithm/fixed/next_permutation.hpp b/sprout/algorithm/fixed/next_permutation.hpp index aed5b968..f846fc58 100644 --- a/sprout/algorithm/fixed/next_permutation.hpp +++ b/sprout/algorithm/fixed/next_permutation.hpp @@ -45,8 +45,8 @@ namespace sprout { inline SPROUT_CONSTEXPR Result next_permutation_impl_3( Container const& cont, Compare comp, - BidirectionalIterator first, BidirectionalIterator last, - BidirectionalIterator i, BidirectionalIterator ii, BidirectionalIterator j + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i, BidirectionalIterator const& ii, BidirectionalIterator const& j ) { return !comp(*i, *sprout::prev(j)) ? sprout::fixed::detail::next_permutation_impl_3( @@ -63,8 +63,8 @@ namespace sprout { inline SPROUT_CONSTEXPR Result next_permutation_impl_2( Container const& cont, Compare comp, - BidirectionalIterator first, BidirectionalIterator last, - BidirectionalIterator i, BidirectionalIterator ii + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i, BidirectionalIterator const& ii ) { return comp(*i, *ii) ? sprout::fixed::detail::next_permutation_impl_3( @@ -80,7 +80,12 @@ namespace sprout { } template inline SPROUT_CONSTEXPR Result - next_permutation_impl_1(Container const& cont, Compare comp, BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator i) { + next_permutation_impl_1( + Container const& cont, Compare comp, + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i + ) + { return i == last ? Result(sprout::deep_copy(cont), false) : sprout::fixed::detail::next_permutation_impl_2( cont, comp, first, last, @@ -90,7 +95,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR Result - next_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator first, BidirectionalIterator last) { + next_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator const& first, BidirectionalIterator const& last) { return first == last ? Result(sprout::deep_copy(cont), false) : sprout::fixed::detail::next_permutation_impl_1( cont, comp, first, last, diff --git a/sprout/algorithm/fixed/partition_copy.hpp b/sprout/algorithm/fixed/partition_copy.hpp index 8e3b1809..38261448 100644 --- a/sprout/algorithm/fixed/partition_copy.hpp +++ b/sprout/algorithm/fixed/partition_copy.hpp @@ -26,7 +26,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partition_copy_impl( - InputIterator, InputIterator, Result const& result, Predicate, + InputIterator const&, InputIterator const&, Result const& result, Predicate, typename sprout::container_traits::size_type, Args const&... args ) @@ -39,7 +39,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partition_copy_impl( - InputIterator first, InputIterator last, Result const& result, Predicate pred, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args ) diff --git a/sprout/algorithm/fixed/prev_permutation.hpp b/sprout/algorithm/fixed/prev_permutation.hpp index 28c987f4..632f05b5 100644 --- a/sprout/algorithm/fixed/prev_permutation.hpp +++ b/sprout/algorithm/fixed/prev_permutation.hpp @@ -45,8 +45,8 @@ namespace sprout { inline SPROUT_CONSTEXPR Result prev_permutation_impl_3( Container const& cont, Compare comp, - BidirectionalIterator first, BidirectionalIterator last, - BidirectionalIterator i, BidirectionalIterator ii, BidirectionalIterator j + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i, BidirectionalIterator const& ii, BidirectionalIterator const& j ) { return !comp(*sprout::prev(j), *i) ? sprout::fixed::detail::prev_permutation_impl_3( @@ -63,8 +63,8 @@ namespace sprout { inline SPROUT_CONSTEXPR Result prev_permutation_impl_2( Container const& cont, Compare comp, - BidirectionalIterator first, BidirectionalIterator last, - BidirectionalIterator i, BidirectionalIterator ii + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i, BidirectionalIterator const& ii ) { return comp(*ii, *i) ? sprout::fixed::detail::prev_permutation_impl_3( @@ -80,7 +80,12 @@ namespace sprout { } template inline SPROUT_CONSTEXPR Result - prev_permutation_impl_1(Container const& cont, Compare comp, BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator i) { + prev_permutation_impl_1( + Container const& cont, Compare comp, + BidirectionalIterator const& first, BidirectionalIterator const& last, + BidirectionalIterator const& i + ) + { return i == last ? Result(sprout::deep_copy(cont), false) : sprout::fixed::detail::prev_permutation_impl_2( cont, comp, first, last, @@ -90,7 +95,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR Result - prev_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator first, BidirectionalIterator last) { + prev_permutation_impl(Container const& cont, Compare comp, BidirectionalIterator const& first, BidirectionalIterator const& last) { return first == last ? Result(sprout::deep_copy(cont), false) : sprout::fixed::detail::prev_permutation_impl_1( cont, comp, first, last, diff --git a/sprout/algorithm/fixed/remove_copy.hpp b/sprout/algorithm/fixed/remove_copy.hpp index d44bec94..8e98dd05 100644 --- a/sprout/algorithm/fixed/remove_copy.hpp +++ b/sprout/algorithm/fixed/remove_copy.hpp @@ -29,7 +29,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type remove_copy_impl( - InputIterator, InputIterator, + InputIterator const&, InputIterator const&, Result const& result, T const&, typename sprout::container_traits::size_type, Args const&... args @@ -43,7 +43,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type remove_copy_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, T const& value, typename sprout::container_traits::size_type size, Args const&... args @@ -62,7 +62,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - remove_copy(InputIterator first, InputIterator last, Result const& result, T const& value) { + remove_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& value) { return sprout::fixed::detail::remove_copy_impl(first, last, result, value, sprout::size(result)); } @@ -71,7 +71,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - remove_copy(InputIterator first, InputIterator last, Result const& result, T const& value) { + remove_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& value) { return sprout::remake( result, sprout::size(result), sprout::make_remove_iterator(value, first, last), diff --git a/sprout/algorithm/fixed/remove_copy_if.hpp b/sprout/algorithm/fixed/remove_copy_if.hpp index f4055ff5..2310d65c 100644 --- a/sprout/algorithm/fixed/remove_copy_if.hpp +++ b/sprout/algorithm/fixed/remove_copy_if.hpp @@ -29,7 +29,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type remove_copy_if_impl( - InputIterator, InputIterator, + InputIterator const&, InputIterator const&, Result const& result, Predicate, typename sprout::container_traits::size_type, Args const&... args @@ -43,7 +43,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type remove_copy_if_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args @@ -62,7 +62,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - remove_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + remove_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::fixed::detail::remove_copy_if_impl(first, last, result, pred, sprout::size(result)); } @@ -71,7 +71,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - remove_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred) { + remove_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred) { return sprout::remake( result, sprout::size(result), sprout::make_remove_if_iterator(pred, first, last), diff --git a/sprout/algorithm/fixed/replace_copy.hpp b/sprout/algorithm/fixed/replace_copy.hpp index 7bc7dd5f..b5d310d0 100644 --- a/sprout/algorithm/fixed/replace_copy.hpp +++ b/sprout/algorithm/fixed/replace_copy.hpp @@ -30,7 +30,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy_impl_ra( - RandomAccessIterator first, RandomAccessIterator, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, T const& old_value, T const& new_value, sprout::index_tuple, typename sprout::container_traits::difference_type offset, @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, T const& old_value, T const& new_value, std::random_access_iterator_tag* ) @@ -83,7 +83,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type replace_copy_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value, typename sprout::container_traits::size_type size, Args const&... args @@ -101,7 +101,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value, std::input_iterator_tag* ) @@ -114,7 +114,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - replace_copy(InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value) { + replace_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::replace_copy(first, last, result, old_value, new_value, category()); } @@ -124,7 +124,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - replace_copy(InputIterator first, InputIterator last, Result const& result, T const& old_value, T const& new_value) { + replace_copy(InputIterator const& first, InputIterator const& last, Result const& result, T const& old_value, T const& new_value) { return sprout::remake( result, sprout::size(result), sprout::make_replace_iterator(first, old_value, new_value), diff --git a/sprout/algorithm/fixed/replace_copy_if.hpp b/sprout/algorithm/fixed/replace_copy_if.hpp index a2d793f3..845c1d07 100644 --- a/sprout/algorithm/fixed/replace_copy_if.hpp +++ b/sprout/algorithm/fixed/replace_copy_if.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy_if_impl_ra( - RandomAccessIterator first, RandomAccessIterator, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, Predicate pred, T const& new_value, sprout::index_tuple, typename sprout::container_traits::difference_type offset, @@ -48,7 +48,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy_if( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, Predicate pred, T const& new_value, std::random_access_iterator_tag* ) @@ -82,7 +82,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type replace_copy_if_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value, typename sprout::container_traits::size_type size, Args const&... args @@ -100,7 +100,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type replace_copy_if( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value, std::input_iterator_tag* ) @@ -113,7 +113,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - replace_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value) { + replace_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::replace_copy_if(first, last, result, pred, new_value, category()); } @@ -123,7 +123,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - replace_copy_if(InputIterator first, InputIterator last, Result const& result, Predicate pred, T const& new_value) { + replace_copy_if(InputIterator const& first, InputIterator const& last, Result const& result, Predicate pred, T const& new_value) { return sprout::remake( result, sprout::size(result), sprout::make_replace_if_iterator(first, pred, new_value), diff --git a/sprout/algorithm/fixed/reverse_copy.hpp b/sprout/algorithm/fixed/reverse_copy.hpp index 19a28ac9..11b764d2 100644 --- a/sprout/algorithm/fixed/reverse_copy.hpp +++ b/sprout/algorithm/fixed/reverse_copy.hpp @@ -27,7 +27,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type reverse_copy_impl_ra( - RandomAccessIterator, RandomAccessIterator last, Result const& result, + RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -46,7 +46,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type reverse_copy( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -78,7 +78,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type reverse_copy_impl( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type reverse_copy( - BidirectionalIterator first, BidirectionalIterator last, Result const& result, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, std::bidirectional_iterator_tag* ) { @@ -103,7 +103,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { + reverse_copy(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::reverse_copy(first, last, result, category()); } @@ -113,7 +113,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - reverse_copy(BidirectionalIterator first, BidirectionalIterator last, Result const& result) { + reverse_copy(BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_reverse_iterator(last), diff --git a/sprout/algorithm/fixed/rotate_copy.hpp b/sprout/algorithm/fixed/rotate_copy.hpp index 0b452234..5ae06e04 100644 --- a/sprout/algorithm/fixed/rotate_copy.hpp +++ b/sprout/algorithm/fixed/rotate_copy.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type rotate_copy_impl_ra( - RandomAccessIterator first, RandomAccessIterator middle, + RandomAccessIterator const& first, RandomAccessIterator const& middle, typename sprout::container_traits::size_type last_half_size, Result const& result, sprout::index_tuple, @@ -53,7 +53,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type rotate_copy( - RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& middle, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) @@ -89,7 +89,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type rotate_copy_impl_1( - ForwardIterator first, ForwardIterator last, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args @@ -121,8 +121,8 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type rotate_copy_impl( - ForwardIterator first, ForwardIterator middle, - ForwardIterator middle_first, ForwardIterator last, + ForwardIterator const& first, ForwardIterator const& middle, + ForwardIterator const& middle_first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args @@ -136,7 +136,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type rotate_copy( - ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result, std::forward_iterator_tag* ) { @@ -148,7 +148,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result) { + rotate_copy(ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::rotate_copy(first, middle, last, result, category()); } @@ -158,7 +158,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, Result const& result) { + rotate_copy(ForwardIterator const& first, ForwardIterator const& middle, ForwardIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_joint_iterator(middle, last, first, first), diff --git a/sprout/algorithm/fixed/stable_partition_copy.hpp b/sprout/algorithm/fixed/stable_partition_copy.hpp index 22d42caa..d1b1e7b2 100644 --- a/sprout/algorithm/fixed/stable_partition_copy.hpp +++ b/sprout/algorithm/fixed/stable_partition_copy.hpp @@ -26,7 +26,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type stable_partition_copy_impl_1( - BidirectionalIterator, BidirectionalIterator, + BidirectionalIterator const&, BidirectionalIterator const&, Result const& result, Predicate, typename sprout::container_traits::size_type, Args const&... args @@ -40,7 +40,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type stable_partition_copy_impl_1( - BidirectionalIterator first, BidirectionalIterator last, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, Args const&... args @@ -81,10 +81,10 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type stable_partition_copy_impl( - BidirectionalIterator first, BidirectionalIterator last, + BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result, Predicate pred, typename sprout::container_traits::size_type size, - BidirectionalIterator temp_first, + BidirectionalIterator const& temp_first, Args const&... args ) { diff --git a/sprout/algorithm/fixed/swap_element_copy.hpp b/sprout/algorithm/fixed/swap_element_copy.hpp index 7818c632..d1e7d4bb 100644 --- a/sprout/algorithm/fixed/swap_element_copy.hpp +++ b/sprout/algorithm/fixed/swap_element_copy.hpp @@ -28,9 +28,9 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type swap_element_copy_impl_ra( - RandomAccessIterator first, RandomAccessIterator, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, - RandomAccessIterator pos1, RandomAccessIterator pos2, + RandomAccessIterator const& pos1, RandomAccessIterator const& pos2, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -53,9 +53,9 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type swap_element_copy( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, - RandomAccessIterator pos1, RandomAccessIterator pos2, + RandomAccessIterator const& pos1, RandomAccessIterator const& pos2, std::random_access_iterator_tag* ) { @@ -91,9 +91,9 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type swap_element_copy_impl( - ForwardIterator first, ForwardIterator last, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, - ForwardIterator pos1, ForwardIterator pos2, + ForwardIterator const& pos1, ForwardIterator const& pos2, typename sprout::container_traits::size_type size, Args const&... args ) @@ -109,9 +109,9 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type swap_element_copy( - ForwardIterator first, ForwardIterator last, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, - ForwardIterator pos1, ForwardIterator pos2, + ForwardIterator const& pos1, ForwardIterator const& pos2, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/fixed/transform.hpp b/sprout/algorithm/fixed/transform.hpp index e8eee993..4f3597f5 100644 --- a/sprout/algorithm/fixed/transform.hpp +++ b/sprout/algorithm/fixed/transform.hpp @@ -30,7 +30,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform_impl_ra( - RandomAccessIterator first, RandomAccessIterator, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, UnaryOperation op, sprout::index_tuple, typename sprout::container_traits::difference_type offset, @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, UnaryOperation op, std::random_access_iterator_tag* ) @@ -84,7 +84,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type transform_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op, typename sprout::container_traits::size_type size, Args const&... args @@ -98,7 +98,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op, std::input_iterator_tag* ) @@ -111,7 +111,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - transform(InputIterator first, InputIterator last, Result const& result, UnaryOperation op) { + transform(InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::transform(first, last, result, op, category()); } @@ -121,7 +121,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - transform(InputIterator first, InputIterator last, Result const& result, UnaryOperation op) { + transform(InputIterator const& first, InputIterator const& last, Result const& result, UnaryOperation op) { return sprout::remake( result, sprout::size(result), sprout::make_transform_iterator(first, op), @@ -148,7 +148,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1, RandomAccessIterator2 first2, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const&, RandomAccessIterator2 first2, Result const& result, BinaryOperation op, sprout::index_tuple, typename sprout::container_traits::difference_type offset, @@ -167,7 +167,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 first2, Result const& result, BinaryOperation op, std::random_access_iterator_tag* ) @@ -201,7 +201,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type transform_impl( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, + InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 first2, Result const& result, BinaryOperation op, typename sprout::container_traits::size_type size, Args const&... args @@ -215,7 +215,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type transform( - InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, + InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 first2, Result const& result, BinaryOperation op, std::input_iterator_tag* ) @@ -228,7 +228,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op) { + transform(InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 const& first2, Result const& result, BinaryOperation op) { typedef typename sprout::common_iterator_category::type* category; return sprout::fixed::detail::transform(first1, last1, first2, result, op, category()); } @@ -238,7 +238,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Result const& result, BinaryOperation op) { + transform(InputIterator1 const& first1, InputIterator1 const& last1, InputIterator2 const& first2, Result const& result, BinaryOperation op) { return sprout::remake( result, sprout::size(result), sprout::make_transform_iterator(first1, first2, op), diff --git a/sprout/algorithm/fixed/unique_copy.hpp b/sprout/algorithm/fixed/unique_copy.hpp index 6d0ee5b8..61701cb8 100644 --- a/sprout/algorithm/fixed/unique_copy.hpp +++ b/sprout/algorithm/fixed/unique_copy.hpp @@ -30,7 +30,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type unique_copy_impl( - InputIterator, InputIterator, + InputIterator const&, InputIterator const&, Result const& result, typename sprout::container_traits::size_type, Head const& head, @@ -45,7 +45,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type unique_copy_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Head const& head, @@ -65,7 +65,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - unique_copy(InputIterator first, InputIterator last, Result const& result) { + unique_copy(InputIterator const& first, InputIterator const& last, Result const& result) { return first != last ? sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, sprout::size(result), *first) : sprout::detail::container_complate(result) @@ -77,7 +77,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - unique_copy(InputIterator first, InputIterator last, Result const& result) { + unique_copy(InputIterator const& first, InputIterator const& last, Result const& result) { static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); return sprout::remake( result, sprout::size(result), @@ -108,7 +108,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type unique_copy_impl( - InputIterator, InputIterator, + InputIterator const&, InputIterator const&, Result const& result, BinaryPredicate, typename sprout::container_traits::size_type, Head const& head, @@ -123,7 +123,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type unique_copy_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred, typename sprout::container_traits::size_type size, Head const& head, @@ -143,7 +143,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - unique_copy(InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred) { + unique_copy(InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred) { return first != last ? sprout::fixed::detail::unique_copy_impl(sprout::next(first), last, result, pred, sprout::size(result), *first) : sprout::detail::container_complate(result) @@ -155,7 +155,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - unique_copy(InputIterator first, InputIterator last, Result const& result, BinaryPredicate pred) { + unique_copy(InputIterator const& first, InputIterator const& last, Result const& result, BinaryPredicate pred) { static_assert(sprout::is_forward_iterator::value, "Sorry, not implemented."); return sprout::remake( result, sprout::size(result), diff --git a/sprout/algorithm/fold_until.hpp b/sprout/algorithm/fold_until.hpp index 1f787256..517f5f24 100644 --- a/sprout/algorithm/fold_until.hpp +++ b/sprout/algorithm/fold_until.hpp @@ -19,7 +19,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair fold_until_impl_1( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -38,7 +38,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair fold_until_impl( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.first == last || pred(current.second) ? current diff --git a/sprout/algorithm/fold_while.hpp b/sprout/algorithm/fold_while.hpp index e568b8d0..bb7de84d 100644 --- a/sprout/algorithm/fold_while.hpp +++ b/sprout/algorithm/fold_while.hpp @@ -19,7 +19,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair fold_while_impl_1( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -38,7 +38,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair fold_while_impl( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.first == last || !pred(current.second) ? current diff --git a/sprout/algorithm/is_heap_until.hpp b/sprout/algorithm/is_heap_until.hpp index 3d811510..7f0ade80 100644 --- a/sprout/algorithm/is_heap_until.hpp +++ b/sprout/algorithm/is_heap_until.hpp @@ -18,7 +18,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type is_heap_until_impl( - RandomAccessIterator it, Compare comp, + RandomAccessIterator const& it, Compare comp, typename std::iterator_traits::difference_type first, typename std::iterator_traits::difference_type last, typename std::iterator_traits::difference_type pivot, typename std::iterator_traits::difference_type found ) @@ -40,7 +40,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator is_heap_until_impl( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, typename std::iterator_traits::difference_type size ) { diff --git a/sprout/algorithm/is_partitioned.hpp b/sprout/algorithm/is_partitioned.hpp index b8ff8b77..53c4daf2 100644 --- a/sprout/algorithm/is_partitioned.hpp +++ b/sprout/algorithm/is_partitioned.hpp @@ -21,7 +21,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR bool - is_partitioned_impl_ra(RandomAccessIterator first, RandomAccessIterator last, Predicate pred) { + is_partitioned_impl_ra(RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred) { return first == last ? true : sprout::none_of(sprout::next(first), last, pred) ; @@ -32,7 +32,7 @@ namespace sprout { bool >::type is_partitioned( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -46,7 +46,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> is_partitioned_impl_1( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair::difference_type> type; @@ -67,7 +67,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> is_partitioned_impl( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.second > 1 || current.first == last ? current @@ -83,7 +83,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_partitioned( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/is_permutation.hpp b/sprout/algorithm/is_permutation.hpp index 1b79bd8d..ebaeac07 100644 --- a/sprout/algorithm/is_permutation.hpp +++ b/sprout/algorithm/is_permutation.hpp @@ -24,16 +24,16 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR bool - is_permutation_impl_check(Difference count, ForwardIterator first, ForwardIterator last, BinaryPredicate pred) + is_permutation_impl_check(Difference count, ForwardIterator const& first, ForwardIterator const& last, BinaryPredicate pred) { return count != 0 && sprout::count_if(sprout::next(first), last, sprout::bind2nd(pred, *first)) + 1 == count; } template inline SPROUT_CONSTEXPR bool is_permutation_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, - BinaryPredicate pred, RandomAccessIterator1 current, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, + RandomAccessIterator2 const& first2, RandomAccessIterator2 const& last2, + BinaryPredicate pred, RandomAccessIterator1 const& current, typename std::iterator_traits::difference_type size ) { @@ -58,7 +58,7 @@ namespace sprout { bool >::type is_permutation( - sprout::pair first, RandomAccessIterator1 last1, BinaryPredicate pred, + sprout::pair first, RandomAccessIterator1 const& last1, BinaryPredicate pred, std::random_access_iterator_tag* ) { @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair is_permutation_impl_1( sprout::pair const& current, - ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, + ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { @@ -98,7 +98,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_permutation_impl( - ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, + ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, BinaryPredicate pred, typename std::iterator_traits::difference_type size ) { @@ -113,7 +113,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_permutation( - sprout::pair first, ForwardIterator1 last1, BinaryPredicate pred, + sprout::pair first, ForwardIterator1 const& last1, BinaryPredicate pred, std::forward_iterator_tag* ) { @@ -147,7 +147,7 @@ namespace sprout { inline SPROUT_CONSTEXPR bool is_permutation_impl_ra_1( sprout::pair first, - RandomAccessIterator1 last1, RandomAccessIterator2 last2, BinaryPredicate pred + RandomAccessIterator1 const& last1, RandomAccessIterator2 const& last2, BinaryPredicate pred ) { return first.first == last1 @@ -163,7 +163,7 @@ namespace sprout { bool >::type is_permutation( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, RandomAccessIterator2 const& first2, RandomAccessIterator2 const& last2, BinaryPredicate pred, std::random_access_iterator_tag* ) { @@ -176,8 +176,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_permutation_impl_3( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, + ForwardIterator1 const& first1, ForwardIterator1 const& last1, + ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, Difference1 size1, Difference2 size2 ) { @@ -193,7 +193,7 @@ namespace sprout { inline SPROUT_CONSTEXPR bool is_permutation_impl_2( sprout::pair first, - ForwardIterator1 last1, ForwardIterator2 last2, BinaryPredicate pred + ForwardIterator1 const& last1, ForwardIterator2 const& last2, BinaryPredicate pred ) { return sprout::detail::is_permutation_impl_3( @@ -205,7 +205,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_permutation( - ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, + ForwardIterator1 const& first1, ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/is_sorted.hpp b/sprout/algorithm/is_sorted.hpp index 9b974bf1..9b653a5e 100644 --- a/sprout/algorithm/is_sorted.hpp +++ b/sprout/algorithm/is_sorted.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_sorted_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, typename std::iterator_traits::difference_type pivot ) { @@ -45,7 +45,7 @@ namespace sprout { bool >::type is_sorted( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, std::random_access_iterator_tag* ) { @@ -60,7 +60,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool is_sorted( - ForwardIterator first, ForwardIterator last, Compare comp, + ForwardIterator const& first, ForwardIterator const& last, Compare comp, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/is_sorted_until.hpp b/sprout/algorithm/is_sorted_until.hpp index 7e33497e..f150b8c0 100644 --- a/sprout/algorithm/is_sorted_until.hpp +++ b/sprout/algorithm/is_sorted_until.hpp @@ -21,8 +21,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator is_sorted_until_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -44,7 +44,7 @@ namespace sprout { RandomAccessIterator >::type is_sorted_until( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, std::random_access_iterator_tag* ) { @@ -62,7 +62,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair is_sorted_until_impl_1( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -83,7 +83,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair is_sorted_until_impl( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { return current.second == last ? current @@ -99,7 +99,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator is_sorted_until( - ForwardIterator first, ForwardIterator last, Compare comp, + ForwardIterator const& first, ForwardIterator const& last, Compare comp, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/lower_bound.hpp b/sprout/algorithm/lower_bound.hpp index 64596766..660294c0 100644 --- a/sprout/algorithm/lower_bound.hpp +++ b/sprout/algorithm/lower_bound.hpp @@ -22,7 +22,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator lower_bound( - ForwardIterator first, typename std::iterator_traits::difference_type len, + ForwardIterator const& first, typename std::iterator_traits::difference_type len, T const& value, Compare comp ) { diff --git a/sprout/algorithm/max_element.hpp b/sprout/algorithm/max_element.hpp index f5d495f0..dae5f5ec 100644 --- a/sprout/algorithm/max_element.hpp +++ b/sprout/algorithm/max_element.hpp @@ -21,14 +21,14 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR ForwardIterator - iter_max(ForwardIterator a, ForwardIterator b, Compare comp) { + iter_max(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { return comp(*a, *b) ? b : a; } template inline SPROUT_CONSTEXPR RandomAccessIterator max_element_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, typename std::iterator_traits::difference_type pivot ) { @@ -52,7 +52,7 @@ namespace sprout { RandomAccessIterator >::type max_element( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, std::random_access_iterator_tag* ) { @@ -68,7 +68,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair max_element_impl_1( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -87,7 +87,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair max_element_impl( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -103,7 +103,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator max_element( - ForwardIterator first, ForwardIterator last, Compare comp, + ForwardIterator const& first, ForwardIterator const& last, Compare comp, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/min_element.hpp b/sprout/algorithm/min_element.hpp index 87c93fd5..8417a241 100644 --- a/sprout/algorithm/min_element.hpp +++ b/sprout/algorithm/min_element.hpp @@ -21,14 +21,14 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR ForwardIterator - iter_min(ForwardIterator a, ForwardIterator b, Compare comp) { + iter_min(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { return comp(*b, *a) ? b : a; } template inline SPROUT_CONSTEXPR RandomAccessIterator min_element_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, typename std::iterator_traits::difference_type pivot ) { @@ -52,7 +52,7 @@ namespace sprout { RandomAccessIterator >::type min_element( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, std::random_access_iterator_tag* ) { @@ -68,7 +68,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair min_element_impl_1( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -87,7 +87,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair min_element_impl( sprout::pair const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -103,7 +103,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator min_element( - ForwardIterator first, ForwardIterator last, Compare comp, + ForwardIterator const& first, ForwardIterator const& last, Compare comp, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/minmax_element.hpp b/sprout/algorithm/minmax_element.hpp index b90362e2..68f40a32 100644 --- a/sprout/algorithm/minmax_element.hpp +++ b/sprout/algorithm/minmax_element.hpp @@ -29,7 +29,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR ForwardIteratorPair - iter_minmax(ForwardIteratorPair const& a, ForwardIterator b, Compare comp) { + iter_minmax(ForwardIteratorPair const& a, ForwardIterator const& b, Compare comp) { return ForwardIteratorPair( comp(*b, *sprout::first(a)) ? b : sprout::first(a), comp(*b, *sprout::second(a)) ? sprout::second(a) : b @@ -37,7 +37,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR sprout::pair - iter_minmax(ForwardIterator a, ForwardIterator b, Compare comp) { + iter_minmax(ForwardIterator const& a, ForwardIterator const& b, Compare comp) { typedef sprout::pair type; return comp(*b, *a) ? type(b, a) @@ -48,7 +48,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::pair minmax_element_impl_ra( - RandomAccessIterator first, Compare comp, + RandomAccessIterator const& first, Compare comp, typename std::iterator_traits::difference_type half ) { @@ -72,7 +72,7 @@ namespace sprout { sprout::pair >::type minmax_element( - RandomAccessIterator first, RandomAccessIterator last, Compare comp, + RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp, std::random_access_iterator_tag* ) { @@ -98,8 +98,8 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair > minmax_element_impl_3( sprout::pair minmax, - ForwardIterator first, ForwardIterator next, - ForwardIterator last, Compare comp) { + ForwardIterator const& first, ForwardIterator const& next, + ForwardIterator const& last, Compare comp) { typedef sprout::pair > type; return next == last ? type( @@ -121,7 +121,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair > minmax_element_impl_1( sprout::pair > const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -142,7 +142,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair > minmax_element_impl( sprout::pair > const& current, - ForwardIterator last, Compare comp, typename std::iterator_traits::difference_type n + ForwardIterator const& last, Compare comp, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -159,7 +159,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::pair > minmax_element_impl_2( - ForwardIterator first, ForwardIterator next, ForwardIterator last, Compare comp + ForwardIterator const& first, ForwardIterator const& next, ForwardIterator const& last, Compare comp ) { typedef sprout::pair type; @@ -171,7 +171,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::pair minmax_element( - ForwardIterator first, ForwardIterator last, Compare comp, + ForwardIterator const& first, ForwardIterator const& last, Compare comp, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/none_of.hpp b/sprout/algorithm/none_of.hpp index 6a84c000..c931fc28 100644 --- a/sprout/algorithm/none_of.hpp +++ b/sprout/algorithm/none_of.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool none_of_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type none_of( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair none_of_impl_1( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair none_of_impl( sprout::pair const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return !current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool none_of( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/none_of_equal.hpp b/sprout/algorithm/none_of_equal.hpp index 357be9f1..26b682ff 100644 --- a/sprout/algorithm/none_of_equal.hpp +++ b/sprout/algorithm/none_of_equal.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool none_of_equal_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, typename std::iterator_traits::difference_type pivot ) { @@ -41,7 +41,7 @@ namespace sprout { bool >::type none_of_equal( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -54,7 +54,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair none_of_equal_impl_1( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair none_of_equal_impl( sprout::pair const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return !current.second || current.first == last ? current @@ -89,7 +89,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool none_of_equal( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/one_of.hpp b/sprout/algorithm/one_of.hpp index 6e0ed87a..66281b66 100644 --- a/sprout/algorithm/one_of.hpp +++ b/sprout/algorithm/one_of.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of_impl_ra_1( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -38,7 +38,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -63,7 +63,7 @@ namespace sprout { bool >::type one_of( - RandomAccessIterator first, RandomAccessIterator last, Predicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred, std::random_access_iterator_tag* ) { @@ -76,7 +76,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> one_of_impl_1( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::pair::difference_type> type; @@ -97,7 +97,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> one_of_impl( sprout::pair::difference_type> const& current, - InputIterator last, Predicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, Predicate pred, typename std::iterator_traits::difference_type n ) { return current.second > 1 || current.first == last ? current @@ -113,7 +113,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of( - InputIterator first, InputIterator last, Predicate pred, + InputIterator const& first, InputIterator const& last, Predicate pred, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/one_of_equal.hpp b/sprout/algorithm/one_of_equal.hpp index 1e6c09a7..99bc94a1 100644 --- a/sprout/algorithm/one_of_equal.hpp +++ b/sprout/algorithm/one_of_equal.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of_equal_impl_ra_1( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, typename std::iterator_traits::difference_type pivot ) { @@ -38,7 +38,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of_equal_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, typename std::iterator_traits::difference_type pivot ) { @@ -63,7 +63,7 @@ namespace sprout { bool >::type one_of_equal( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -76,7 +76,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> one_of_equal_impl_1( sprout::pair::difference_type> const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair::difference_type> type; @@ -97,7 +97,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair::difference_type> one_of_equal_impl( sprout::pair::difference_type> const& current, - InputIterator last, T const& value, typename std::iterator_traits::difference_type n + InputIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return current.second > 1 || current.first == last ? current @@ -113,7 +113,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool one_of_equal( - InputIterator first, InputIterator last, T const& value, + InputIterator const& first, InputIterator const& last, T const& value, std::input_iterator_tag* ) { diff --git a/sprout/algorithm/partition_point.hpp b/sprout/algorithm/partition_point.hpp index c7b672ae..2e8a7c40 100644 --- a/sprout/algorithm/partition_point.hpp +++ b/sprout/algorithm/partition_point.hpp @@ -21,7 +21,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR ForwardIterator - partition_point_impl(ForwardIterator first, ForwardIterator last, Predicate pred, ForwardIterator mid) { + partition_point_impl(ForwardIterator const& first, ForwardIterator const& last, Predicate pred, ForwardIterator const& mid) { return mid == last ? mid : pred(*mid) ? sprout::detail::partition_point_impl( sprout::next(mid), last, pred, diff --git a/sprout/algorithm/search.hpp b/sprout/algorithm/search.hpp index f8a276e6..c08370fe 100644 --- a/sprout/algorithm/search.hpp +++ b/sprout/algorithm/search.hpp @@ -22,10 +22,10 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator1 search_impl_ra( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, + ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 last1_, RandomAccessIterator1 searched + typename std::iterator_traits::difference_type pivot, RandomAccessIterator1 const& last1_, RandomAccessIterator1 const& searched ) { return searched < first1 || searched == last1_ ? searched @@ -47,8 +47,8 @@ namespace sprout { RandomAccessIterator1 >::type search( - RandomAccessIterator1 first1, RandomAccessIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, + RandomAccessIterator1 const& first1, RandomAccessIterator1 const& last1, + ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, std::random_access_iterator_tag* ) @@ -63,7 +63,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR sprout::pair - search_impl_fork(sprout::pair const& current, ForwardIterator1 last1, ForwardIterator1 searched) { + search_impl_fork(sprout::pair const& current, ForwardIterator1 const& last1, ForwardIterator1 const& searched) { typedef sprout::pair type; return searched == current.first || searched == last1 ? type(searched, true) : type(sprout::next(current.first), false) @@ -73,7 +73,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair search_impl_1( sprout::pair const& current, - ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, + ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { @@ -95,7 +95,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair search_impl( sprout::pair const& current, - ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred, + ForwardIterator1 const& last1, ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { @@ -112,8 +112,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator1 search( - ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, + ForwardIterator1 const& first1, ForwardIterator1 const& last1, + ForwardIterator2 const& first2, ForwardIterator2 const& last2, BinaryPredicate pred, std::forward_iterator_tag* ) diff --git a/sprout/algorithm/search_n.hpp b/sprout/algorithm/search_n.hpp index 1021c299..fc179a3d 100644 --- a/sprout/algorithm/search_n.hpp +++ b/sprout/algorithm/search_n.hpp @@ -21,10 +21,10 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator search_n_impl_ra( - RandomAccessIterator current, RandomAccessIterator last, + RandomAccessIterator const& current, RandomAccessIterator const& last, Size count, T const& value, BinaryPredicate pred, typename std::iterator_traits::difference_type len, - RandomAccessIterator searched + RandomAccessIterator const& searched ) { return sprout::distance(searched, current) >= count || searched == last ? searched @@ -44,7 +44,7 @@ namespace sprout { RandomAccessIterator >::type search_n( - RandomAccessIterator first, RandomAccessIterator last, Size count, T const& value, BinaryPredicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, Size count, T const& value, BinaryPredicate pred, std::random_access_iterator_tag* ) { @@ -59,7 +59,7 @@ namespace sprout { inline SPROUT_CONSTEXPR ForwardIterator search_n_impl_check( sprout::tuple current, - ForwardIterator last, Size count + ForwardIterator const& last, Size count ) { return sprout::tuples::get<2>(current) == count ? sprout::tuples::get<1>(current) : last; @@ -68,7 +68,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::tuple search_n_impl_1( sprout::tuple current, - ForwardIterator last, Size count, T const& value, BinaryPredicate pred, + ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { @@ -91,7 +91,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::tuple search_n_impl( sprout::tuple current, - ForwardIterator last, Size count, T const& value, BinaryPredicate pred, + ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { @@ -108,7 +108,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator search_n( - ForwardIterator first, ForwardIterator last, Size count, T const& value, BinaryPredicate pred, + ForwardIterator const& first, ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred, std::forward_iterator_tag* ) { diff --git a/sprout/algorithm/string/fit/to_lower_copy.hpp b/sprout/algorithm/string/fit/to_lower_copy.hpp index d54ff5f9..0b4f28a6 100644 --- a/sprout/algorithm/string/fit/to_lower_copy.hpp +++ b/sprout/algorithm/string/fit/to_lower_copy.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type to_lower_copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/string/fit/to_upper_copy.hpp b/sprout/algorithm/string/fit/to_upper_copy.hpp index 112b4adc..ae4bcb92 100644 --- a/sprout/algorithm/string/fit/to_upper_copy.hpp +++ b/sprout/algorithm/string/fit/to_upper_copy.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type to_upper_copy_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/algorithm/string/join.hpp b/sprout/algorithm/string/join.hpp index a05fd3d8..3cab47de 100644 --- a/sprout/algorithm/string/join.hpp +++ b/sprout/algorithm/string/join.hpp @@ -105,8 +105,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type join_impl_ra_2( - ContIterator first_cont, - SizeIterator found, + ContIterator const& first_cont, + SizeIterator const& found, Sizes const& sizes, sprout::index_t idx ) @@ -119,7 +119,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR Result join_impl_ra_1( - ContIterator first_cont, + ContIterator const& first_cont, sprout::index_tuple, Sizes const& sizes ) @@ -156,7 +156,7 @@ namespace sprout { sprout::container_traits::static_size == sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, + ContIterator const& first_cont, ContIterator const& last_cont, Args const&... args ); template @@ -164,7 +164,7 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, + ContIterator const& first_cont, ContIterator const& last_cont, Args const&... args ); template @@ -184,8 +184,8 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl_1( - ContIterator first_cont, ContIterator last_cont, - InputIterator first, InputIterator last, + ContIterator const& first_cont, ContIterator const& last_cont, + InputIterator const& first, InputIterator const& last, Args const&... args ) { @@ -214,7 +214,7 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, + ContIterator const& first_cont, ContIterator const& last_cont, Args const&... args ) { @@ -279,8 +279,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::container_traits::value_type join_impl_ra_2( - ContIterator first_cont, SepIterator first, - SizeIterator found, + ContIterator const& first_cont, SepIterator const& first, + SizeIterator const& found, Sizes const& sizes, sprout::index_t idx ) @@ -294,8 +294,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR Result join_impl_ra_1( - ContIterator first_cont, - SepIterator first, + ContIterator const& first_cont, + SepIterator const& first, sprout::index_tuple, Sizes const& sizes ) @@ -336,7 +336,7 @@ namespace sprout { sprout::container_traits::static_size == sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, + ContIterator const& first_cont, ContIterator const& last_cont, Args const&... args ); template @@ -344,7 +344,7 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, + ContIterator const& first_cont, ContIterator const& last_cont, Args const&... args ); template @@ -366,10 +366,10 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl_1( - ContIterator first_cont, ContIterator last_cont, - SepIterator sep_first, SepIterator sep_last, + ContIterator const& first_cont, ContIterator const& last_cont, + SepIterator const& sep_first, SepIterator const& sep_last, bool sep, - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, Args const&... args ) { @@ -414,8 +414,8 @@ namespace sprout { sprout::container_traits::static_size != sizeof...(Args), Result >::type join_impl( - ContIterator first_cont, ContIterator last_cont, - SepIterator sep_first, SepIterator sep_last, + ContIterator const& first_cont, ContIterator const& last_cont, + SepIterator const& sep_first, SepIterator const& sep_last, bool sep, Args const&... args ) diff --git a/sprout/algorithm/upper_bound.hpp b/sprout/algorithm/upper_bound.hpp index 888b7eb4..9b5d8496 100644 --- a/sprout/algorithm/upper_bound.hpp +++ b/sprout/algorithm/upper_bound.hpp @@ -22,7 +22,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR ForwardIterator upper_bound( - ForwardIterator first, typename std::iterator_traits::difference_type len, + ForwardIterator const& first, typename std::iterator_traits::difference_type len, T const& value, Compare comp ) { diff --git a/sprout/brainfuck/brainfuck.hpp b/sprout/brainfuck/brainfuck.hpp index 97837bd9..b457c92d 100644 --- a/sprout/brainfuck/brainfuck.hpp +++ b/sprout/brainfuck/brainfuck.hpp @@ -29,7 +29,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR InputIterator - find_scope_end(InputIterator first, std::size_t count = 0) { + find_scope_end(InputIterator const& first, std::size_t count = 0) { typedef typename std::iterator_traits::value_type value_type; return *first == SPROUT_CHAR_LITERAL('[', value_type) ? sprout::brainfuck::detail::find_scope_end(sprout::next(first), count + 1) : *first == SPROUT_CHAR_LITERAL(']', value_type) ? count == 0 @@ -41,7 +41,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR BidirectionalIterator - find_scope_start(BidirectionalIterator first, std::size_t count = 0) { + find_scope_start(BidirectionalIterator const& first, std::size_t count = 0) { typedef typename std::iterator_traits::value_type value_type; return *first == SPROUT_CHAR_LITERAL(']', value_type) ? sprout::brainfuck::detail::find_scope_start(sprout::prev(first), count + 1) : *first == SPROUT_CHAR_LITERAL('[', value_type) ? count == 0 @@ -53,7 +53,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool - is_well_formed(InputIterator first, InputIterator last, std::size_t count = 0) { + is_well_formed(InputIterator const& first, InputIterator const& last, std::size_t count = 0) { typedef typename std::iterator_traits::value_type value_type; return first == last ? count == 0 : *first == SPROUT_CHAR_LITERAL('[', value_type) diff --git a/sprout/cstdlib/ascii_to_int.hpp b/sprout/cstdlib/ascii_to_int.hpp index 90da62eb..3d35c40f 100644 --- a/sprout/cstdlib/ascii_to_int.hpp +++ b/sprout/cstdlib/ascii_to_int.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR IntType - ascii_to_int_impl(NullTerminatedIterator str, IntType val, bool negative) { + ascii_to_int_impl(NullTerminatedIterator const& str, IntType val, bool negative) { typedef typename std::iterator_traits::value_type value_type; SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits::value); return !sprout::ascii::isdigit(*str) @@ -44,7 +44,7 @@ namespace sprout { sprout::is_unsigned::value, IntType >::type - ascii_to_int(NullTerminatedIterator str) { + ascii_to_int(NullTerminatedIterator const& str) { typedef typename std::iterator_traits::value_type value_type; return sprout::ascii::isspace(*str) ? sprout::detail::ascii_to_int(sprout::next(str)) @@ -58,7 +58,7 @@ namespace sprout { sprout::is_signed::value, IntType >::type - ascii_to_int(NullTerminatedIterator str) { + ascii_to_int(NullTerminatedIterator const& str) { typedef typename std::iterator_traits::value_type value_type; return sprout::ascii::isspace(*str) ? sprout::detail::ascii_to_int(sprout::next(str)) diff --git a/sprout/cstdlib/str_to_float.hpp b/sprout/cstdlib/str_to_float.hpp index 1851d9eb..8b3e31e9 100644 --- a/sprout/cstdlib/str_to_float.hpp +++ b/sprout/cstdlib/str_to_float.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_scale( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -50,7 +50,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_exponent_2( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -75,7 +75,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_exponent_1( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -108,7 +108,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_exponent( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -148,7 +148,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_decimal_1( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -170,7 +170,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl_decimal( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0, @@ -202,7 +202,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR FloatType str_to_float_impl( - NullTerminatedIterator str, + NullTerminatedIterator const& str, bool negative, FloatType number = FloatType(), std::size_t num_digits = 0 @@ -232,7 +232,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR FloatType - str_to_float(NullTerminatedIterator str) { + str_to_float(NullTerminatedIterator const& str) { typedef typename std::iterator_traits::value_type char_type; return sprout::ascii::isspace(*str) ? sprout::detail::str_to_float(sprout::next(str)) @@ -245,7 +245,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR FloatType - str_to_float(NullTerminatedIterator str, CharPtr* endptr) { + str_to_float(NullTerminatedIterator const& str, CharPtr* endptr) { return !endptr ? sprout::detail::str_to_float(str) #if defined(__MINGW32__) : std::is_same::type, float>::value ? ::strtof(&*str, endptr) diff --git a/sprout/cstdlib/str_to_int.hpp b/sprout/cstdlib/str_to_int.hpp index fb0766b1..e2571091 100644 --- a/sprout/cstdlib/str_to_int.hpp +++ b/sprout/cstdlib/str_to_int.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR IntType - str_to_int_impl_1(NullTerminatedIterator str, int base, IntType val, IntType x, bool negative) { + str_to_int_impl_1(NullTerminatedIterator const& str, int base, IntType val, IntType x, bool negative) { return x == static_cast(-1) ? (negative ? -1 * val : val) : val > (sprout::numeric_limits::max() - x - (negative ? 1 : 0)) / base ? (negative ? sprout::numeric_limits::min() : sprout::numeric_limits::max()) @@ -44,7 +44,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR IntType - str_to_int_impl(NullTerminatedIterator str, int base, bool negative) { + str_to_int_impl(NullTerminatedIterator const& str, int base, bool negative) { typedef typename std::iterator_traits::value_type char_type; return *str == SPROUT_CHAR_LITERAL('0', char_type) ? *sprout::next(str) == SPROUT_CHAR_LITERAL('x', char_type) @@ -77,7 +77,7 @@ namespace sprout { sprout::is_unsigned::value, IntType >::type - str_to_int(NullTerminatedIterator str, int base) { + str_to_int(NullTerminatedIterator const& str, int base) { typedef typename std::iterator_traits::value_type char_type; return sprout::ascii::isspace(*str) ? sprout::detail::str_to_int(sprout::next(str), base) @@ -91,7 +91,7 @@ namespace sprout { sprout::is_signed::value, IntType >::type - str_to_int(NullTerminatedIterator str, int base) { + str_to_int(NullTerminatedIterator const& str, int base) { typedef typename std::iterator_traits::value_type char_type; return sprout::ascii::isspace(*str) ? sprout::detail::str_to_int(sprout::next(str), base) @@ -104,7 +104,7 @@ namespace sprout { } template inline SPROUT_CONSTEXPR IntType - str_to_int(NullTerminatedIterator str, CharPtr* endptr, int base) { + str_to_int(NullTerminatedIterator const& str, CharPtr* endptr, int base) { return !endptr ? sprout::detail::str_to_int(str, base) #if defined(_MSC_VER) : sprout::is_signed::value diff --git a/sprout/detail/algorithm/count_n.hpp b/sprout/detail/algorithm/count_n.hpp index fdd0853b..9a678784 100644 --- a/sprout/detail/algorithm/count_n.hpp +++ b/sprout/detail/algorithm/count_n.hpp @@ -24,7 +24,7 @@ namespace sprout { typename std::iterator_traits::difference_type >::type count_n( - RandomAccessIterator first, typename std::iterator_traits::difference_type n, T const& value, + RandomAccessIterator const& first, typename std::iterator_traits::difference_type n, T const& value, std::random_access_iterator_tag* ) { @@ -52,7 +52,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count_n( - InputIterator first, typename std::iterator_traits::difference_type n, T const& value, + InputIterator const& first, typename std::iterator_traits::difference_type n, T const& value, std::input_iterator_tag* ) { @@ -70,7 +70,7 @@ namespace sprout { // template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n(InputIterator first, typename std::iterator_traits::difference_type n, T const& value) { + count_n(InputIterator const& first, typename std::iterator_traits::difference_type n, T const& value) { typedef typename std::iterator_traits::iterator_category* category; return sprout::detail::count_n(first, n, value, category()); } diff --git a/sprout/detail/algorithm/count_n_if.hpp b/sprout/detail/algorithm/count_n_if.hpp index 1d74fb00..1db711f9 100644 --- a/sprout/detail/algorithm/count_n_if.hpp +++ b/sprout/detail/algorithm/count_n_if.hpp @@ -25,7 +25,7 @@ namespace sprout { typename std::iterator_traits::difference_type >::type count_n_if( - RandomAccessIterator first, typename std::iterator_traits::difference_type n, Predicate pred, + RandomAccessIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred, std::random_access_iterator_tag* ) { @@ -53,7 +53,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type count_n_if( - InputIterator first, typename std::iterator_traits::difference_type n, Predicate pred, + InputIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred, std::input_iterator_tag* ) { @@ -71,7 +71,7 @@ namespace sprout { // template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - count_n_if(InputIterator first, typename std::iterator_traits::difference_type n, Predicate pred) { + count_n_if(InputIterator const& first, typename std::iterator_traits::difference_type n, Predicate pred) { typedef typename std::iterator_traits::iterator_category* category; return sprout::detail::count_n_if(first, n, pred, category()); diff --git a/sprout/detail/algorithm/overlap_count.hpp b/sprout/detail/algorithm/overlap_count.hpp index 82d73b57..1530775c 100644 --- a/sprout/detail/algorithm/overlap_count.hpp +++ b/sprout/detail/algorithm/overlap_count.hpp @@ -21,7 +21,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type overlap_count_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type pivot ) { @@ -42,7 +42,7 @@ namespace sprout { typename std::iterator_traits::difference_type >::type overlap_count( - RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred, + RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred, std::random_access_iterator_tag* ) { @@ -58,7 +58,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> overlap_count_impl_1( sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> const& current, - InputIterator last, BinaryPredicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { typedef sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> type; @@ -80,7 +80,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> overlap_count_impl( sprout::tuples::tuple::value_type, typename std::iterator_traits::difference_type> const& current, - InputIterator last, BinaryPredicate pred, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits::difference_type n ) { return sprout::tuples::get<0>(current) == last ? current @@ -96,7 +96,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type overlap_count( - InputIterator first, InputIterator last, BinaryPredicate pred, + InputIterator const& first, InputIterator const& last, BinaryPredicate pred, std::input_iterator_tag* ) { @@ -116,14 +116,14 @@ namespace sprout { // template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count(InputIterator first, InputIterator last, BinaryPredicate pred) { + overlap_count(InputIterator const& first, InputIterator const& last, BinaryPredicate pred) { typedef typename std::iterator_traits::iterator_category* category; return sprout::detail::overlap_count(first, last, pred, category()); } template inline SPROUT_CONSTEXPR typename std::iterator_traits::difference_type - overlap_count(InputIterator first, InputIterator last) { + overlap_count(InputIterator const& first, InputIterator const& last) { return sprout::detail::overlap_count( first, last, NS_SSCRISK_CEL_OR_SPROUT::equal_to::value_type>() diff --git a/sprout/detail/str.hpp b/sprout/detail/str.hpp index 777b2f13..ee544501 100644 --- a/sprout/detail/str.hpp +++ b/sprout/detail/str.hpp @@ -14,7 +14,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR InputIterator - str_find_check(InputIterator found) { + str_find_check(InputIterator const& found) { return !*found ? InputIterator() : found ; @@ -22,7 +22,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR InputIterator - str_find_check(InputIterator found, T const& value) { + str_find_check(InputIterator const& found, T const& value) { return !(*found == value) && !*found ? InputIterator() : found ; diff --git a/sprout/io.hpp b/sprout/io.hpp index 6cc33127..e71c5e59 100644 --- a/sprout/io.hpp +++ b/sprout/io.hpp @@ -809,7 +809,7 @@ namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR Elem - get_param(RandomAccessIterator found, sprout::array const& sizes, std::size_t idx, Args const&... args) { + get_param(RandomAccessIterator const& found, sprout::array const& sizes, std::size_t idx, Args const&... args) { return found == sizes.end() ? static_cast('\0') : sprout::detail::param_seq_at( found - sizes.begin(), diff --git a/sprout/iterator/merge_iterator.hpp b/sprout/iterator/merge_iterator.hpp index d9a1866c..f8ebf846 100644 --- a/sprout/iterator/merge_iterator.hpp +++ b/sprout/iterator/merge_iterator.hpp @@ -51,41 +51,41 @@ namespace sprout { typedef typename sprout::common_iterator_reference::type reference; private: static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp ) { - return it1 != lst_1 ? (it2 != lst_2 ? !comp(*it2, *it1) : true) - : !(it2 != lst_2) + return it1 != las1 ? (it2 != las2 ? !comp(*it2, *it1) : true) + : !(it2 != las2) ; } protected: iterator_type current1; - iterator_type lst_1; + iterator_type las1; iterator2_type current2; - iterator2_type lst_2; + iterator2_type las2; Compare comp; bool in_left; public: SPROUT_CONSTEXPR merge_iterator() - : current1(), lst_1(), current2(), lst_2(), comp(), in_left(true) + : current1(), las1(), current2(), las2(), comp(), in_left(true) {} merge_iterator(merge_iterator const&) = default; SPROUT_CONSTEXPR merge_iterator( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp = Compare() ) - : current1(it1), lst_1(lst_1) - , current2(it2), lst_2(lst_2) + : current1(it1), las1(las1) + , current2(it2), las2(las2) , comp(comp) - , in_left(check_in_left(it1, lst_1, it2, lst_2, comp)) + , in_left(check_in_left(it1, las1, it2, las2, comp)) {} template SPROUT_CONSTEXPR merge_iterator(merge_iterator const& it) - : current1(it.base()), lst_1(it.last1()) - , current2(it.base2()), lst_2(it.last2()) + : current1(it.base()), las1(it.last1()) + , current2(it.base2()), las2(it.last2()) , comp(it.compare()) , in_left(it.is_in_left()) {} @@ -99,13 +99,13 @@ namespace sprout { return current1; } SPROUT_CONSTEXPR iterator_type last1() const { - return lst_1; + return las1; } SPROUT_CONSTEXPR iterator2_type base2() const { return current2; } SPROUT_CONSTEXPR iterator2_type last2() const { - return lst_2; + return las2; } SPROUT_CONSTEXPR Compare compare() const { return comp; @@ -120,8 +120,8 @@ namespace sprout { return &*(*this); } SPROUT_CXX14_CONSTEXPR merge_iterator& operator++() { - if (current1 != lst_1) { - if (current2 != lst_2) { + if (current1 != las1) { + if (current2 != las2) { if (comp(*current2, *current1)) { ++current2; } else { @@ -130,16 +130,16 @@ namespace sprout { } else { ++current1; } - } else if (current2 != lst_2) { + } else if (current2 != las2) { ++current2; } - in_left = check_in_left(current1, lst_1, current2, lst_2, comp); + in_left = check_in_left(current1, las1, current2, las2, comp); return *this; } SPROUT_CXX14_CONSTEXPR merge_iterator operator++(int) { merge_iterator result(*this); - if (current1 != lst_1) { - if (current2 != lst_2) { + if (current1 != las1) { + if (current2 != las2) { if (comp(*current2, *current1)) { ++current2; } else { @@ -148,38 +148,38 @@ namespace sprout { } else { ++current1; } - } else if (current2 != lst_2) { + } else if (current2 != las2) { ++current2; } - in_left = check_in_left(current1, lst_1, current2, lst_2, comp); + in_left = check_in_left(current1, las1, current2, las2, comp); return result; } SPROUT_CONSTEXPR merge_iterator next() const { - return current1 != lst_1 - ? current2 != lst_2 + return current1 != las1 + ? current2 != las2 ? comp(*current2, *current1) - ? merge_iterator(current1, lst_1, sprout::next(current2), lst_2, comp) - : merge_iterator(sprout::next(current1), lst_1, current2, lst_2, comp) - : merge_iterator(sprout::next(current1), lst_1, current2, lst_2, comp) - : current2 != lst_2 - ? merge_iterator(current1, lst_1, sprout::next(current2), lst_2, comp) + ? merge_iterator(current1, las1, sprout::next(current2), las2, comp) + : merge_iterator(sprout::next(current1), las1, current2, las2, comp) + : merge_iterator(sprout::next(current1), las1, current2, las2, comp) + : current2 != las2 + ? merge_iterator(current1, las1, sprout::next(current2), las2, comp) : *this ; } SPROUT_CXX14_CONSTEXPR void swap(merge_iterator& other) SPROUT_NOEXCEPT_IF( SPROUT_NOEXCEPT_EXPR(sprout::swap(current1, other.current1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_1, other.lst_1)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(current2, other.current2)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_2, other.lst_2)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(in_left, other.in_left)) ) { sprout::swap(current1, other.current1); - sprout::swap(lst_1, other.lst_1); + sprout::swap(las1, other.las1); sprout::swap(current2, other.current2); - sprout::swap(lst_2, other.lst_2); + sprout::swap(las2, other.las2); sprout::swap(comp, other.comp); sprout::swap(in_left, other.in_left); } @@ -213,13 +213,13 @@ namespace sprout { // template inline SPROUT_CONSTEXPR sprout::merge_iterator - make_merge_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) { - return sprout::merge_iterator(it1, lst_1, it2, lst_2, comp); + make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { + return sprout::merge_iterator(it1, las1, it2, las2, comp); } template inline SPROUT_CONSTEXPR sprout::merge_iterator - make_merge_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) { - return sprout::merge_iterator(it1, lst_1, it2, lst_2); + make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { + return sprout::merge_iterator(it1, las1, it2, las2); } // diff --git a/sprout/iterator/set_difference_iterator.hpp b/sprout/iterator/set_difference_iterator.hpp index fbf13368..2d977ddc 100644 --- a/sprout/iterator/set_difference_iterator.hpp +++ b/sprout/iterator/set_difference_iterator.hpp @@ -56,33 +56,33 @@ namespace sprout { typedef sprout::pair pair_type; protected: pair_type current; - iterator_type lst_1; - iterator2_type lst_2; + iterator_type las1; + iterator2_type las2; Compare comp; private: SPROUT_CONSTEXPR set_difference_iterator(set_difference_iterator const& other, pair_type const& next) : current(next) - , lst_1(other.lst_1), lst_2(other.lst_2) + , las1(other.las1), las2(other.las2) , comp(other.comp) {} public: SPROUT_CONSTEXPR set_difference_iterator() - : current(), lst_1(), lst_2(), comp() + : current(), las1(), las2(), comp() {} set_difference_iterator(set_difference_iterator const&) = default; SPROUT_CONSTEXPR set_difference_iterator( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp = Compare() ) - : current(sprout::find_difference(it1, lst_1, it2, lst_2, comp)) - , lst_1(lst_1), lst_2(lst_2) + : current(sprout::find_difference(it1, las1, it2, las2, comp)) + , las1(las1), las2(las2) , comp(comp) {} template SPROUT_CONSTEXPR set_difference_iterator(set_difference_iterator const& it) : current(it.base(), it.base2()) - , lst_1(it.last1()), lst_2(it.last2()) + , las1(it.last1()), las2(it.last2()) , comp(it.compare()) {} template @@ -95,13 +95,13 @@ namespace sprout { return current.first; } SPROUT_CONSTEXPR iterator_type last1() const { - return lst_1; + return las1; } SPROUT_CONSTEXPR iterator2_type base2() const { return current.second; } SPROUT_CONSTEXPR iterator2_type last2() const { - return lst_2; + return las2; } SPROUT_CONSTEXPR Compare compare() const { return comp; @@ -116,31 +116,31 @@ namespace sprout { return &*(*this); } SPROUT_CXX14_CONSTEXPR set_difference_iterator& operator++() { - current = sprout::next_difference(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_difference(current.first, las1, current.second, las2, comp); return *this; } SPROUT_CXX14_CONSTEXPR set_difference_iterator operator++(int) { set_difference_iterator result(*this); - current = sprout::next_difference(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_difference(current.first, las1, current.second, las2, comp); return result; } SPROUT_CONSTEXPR set_difference_iterator next() const { return set_difference_iterator( *this, - sprout::next_difference(current.first, lst_1, current.second, lst_2, comp) + sprout::next_difference(current.first, las1, current.second, las2, comp) ); } SPROUT_CXX14_CONSTEXPR void swap(set_difference_iterator& other) SPROUT_NOEXCEPT_IF( SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_1, other.lst_1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_2, other.lst_2)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) ) { sprout::swap(current, other.current); - sprout::swap(lst_1, other.lst_1); - sprout::swap(lst_2, other.lst_2); + sprout::swap(las1, other.las1); + sprout::swap(las2, other.las2); sprout::swap(comp, other.comp); } }; @@ -173,13 +173,13 @@ namespace sprout { // template inline SPROUT_CONSTEXPR sprout::set_difference_iterator - make_set_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) { - return sprout::set_difference_iterator(it1, lst_1, it2, lst_2, comp); + make_set_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { + return sprout::set_difference_iterator(it1, las1, it2, las2, comp); } template inline SPROUT_CONSTEXPR sprout::set_difference_iterator - make_set_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) { - return sprout::set_difference_iterator(it1, lst_1, it2, lst_2); + make_set_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { + return sprout::set_difference_iterator(it1, las1, it2, las2); } // diff --git a/sprout/iterator/set_intersection_iterator.hpp b/sprout/iterator/set_intersection_iterator.hpp index 54200079..802f25e5 100644 --- a/sprout/iterator/set_intersection_iterator.hpp +++ b/sprout/iterator/set_intersection_iterator.hpp @@ -56,33 +56,33 @@ namespace sprout { typedef sprout::pair pair_type; protected: pair_type current; - iterator_type lst_1; - iterator2_type lst_2; + iterator_type las1; + iterator2_type las2; Compare comp; private: SPROUT_CONSTEXPR set_intersection_iterator(set_intersection_iterator const& other, pair_type const& next) : current(next) - , lst_1(other.lst_1), lst_2(other.lst_2) + , las1(other.las1), las2(other.las2) , comp(other.comp) {} public: SPROUT_CONSTEXPR set_intersection_iterator() - : current(), lst_1(), lst_2(), comp() + : current(), las1(), las2(), comp() {} set_intersection_iterator(set_intersection_iterator const&) = default; SPROUT_CONSTEXPR set_intersection_iterator( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp = Compare() ) - : current(sprout::find_intersection(it1, lst_1, it2, lst_2, comp)) - , lst_1(lst_1), lst_2(lst_2) + : current(sprout::find_intersection(it1, las1, it2, las2, comp)) + , las1(las1), las2(las2) , comp(comp) {} template SPROUT_CONSTEXPR set_intersection_iterator(set_intersection_iterator const& it) : current(it.base(), it.base2()) - , lst_1(it.last1()), lst_2(it.last2()) + , las1(it.last1()), las2(it.last2()) , comp(it.compare()) {} template @@ -95,13 +95,13 @@ namespace sprout { return current.first; } SPROUT_CONSTEXPR iterator_type last1() const { - return lst_1; + return las1; } SPROUT_CONSTEXPR iterator2_type base2() const { return current.second; } SPROUT_CONSTEXPR iterator2_type last2() const { - return lst_2; + return las2; } SPROUT_CONSTEXPR Compare compare() const { return comp; @@ -116,31 +116,31 @@ namespace sprout { return &*(*this); } SPROUT_CXX14_CONSTEXPR set_intersection_iterator& operator++() { - current = sprout::next_intersection(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_intersection(current.first, las1, current.second, las2, comp); return *this; } SPROUT_CXX14_CONSTEXPR set_intersection_iterator operator++(int) { set_intersection_iterator result(*this); - current = sprout::next_intersection(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_intersection(current.first, las1, current.second, las2, comp); return result; } SPROUT_CONSTEXPR set_intersection_iterator next() const { return set_intersection_iterator( *this, - sprout::next_intersection(current.first, lst_1, current.second, lst_2, comp) + sprout::next_intersection(current.first, las1, current.second, las2, comp) ); } SPROUT_CXX14_CONSTEXPR void swap(set_intersection_iterator& other) SPROUT_NOEXCEPT_IF( SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_1, other.lst_1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_2, other.lst_2)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) ) { sprout::swap(current, other.current); - sprout::swap(lst_1, other.lst_1); - sprout::swap(lst_2, other.lst_2); + sprout::swap(las1, other.las1); + sprout::swap(las2, other.las2); sprout::swap(comp, other.comp); } }; @@ -173,13 +173,13 @@ namespace sprout { // template inline SPROUT_CONSTEXPR sprout::set_intersection_iterator - make_set_intersection_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) { - return sprout::set_intersection_iterator(it1, lst_1, it2, lst_2, comp); + make_set_intersection_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { + return sprout::set_intersection_iterator(it1, las1, it2, las2, comp); } template inline SPROUT_CONSTEXPR sprout::set_intersection_iterator - make_set_intersection_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) { - return sprout::set_intersection_iterator(it1, lst_1, it2, lst_2); + make_set_intersection_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { + return sprout::set_intersection_iterator(it1, las1, it2, las2); } // diff --git a/sprout/iterator/set_symmetric_difference_iterator.hpp b/sprout/iterator/set_symmetric_difference_iterator.hpp index 5d1d670f..85404f2c 100644 --- a/sprout/iterator/set_symmetric_difference_iterator.hpp +++ b/sprout/iterator/set_symmetric_difference_iterator.hpp @@ -43,45 +43,45 @@ namespace sprout { typedef sprout::pair pair_type; protected: static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp ) { - return it1 != lst_1 ? (it2 != lst_2 ? comp(*it1, *it2) : true) - : !(it2 != lst_2) + return it1 != las1 ? (it2 != las2 ? comp(*it1, *it2) : true) + : !(it2 != las2) ; } protected: pair_type current; - iterator_type lst_1; - iterator2_type lst_2; + iterator_type las1; + iterator2_type las2; Compare comp; protected: bool in_left; protected: SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl() - : current(), lst_1(), lst_2(), comp(), in_left(true) + : current(), las1(), las2(), comp(), in_left(true) {} set_symmetric_difference_iterator_impl(set_symmetric_difference_iterator_impl const&) = default; SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl( pair_type const& current, - iterator_type lst_1, iterator2_type lst_2, + iterator_type las1, iterator2_type las2, Compare comp ) : current(current) - , lst_1(lst_1), lst_2(lst_2) + , las1(las1), las2(las2) , comp(comp) - , in_left(check_in_left(current.first, lst_1, current.second, lst_2, comp)) + , in_left(check_in_left(current.first, las1, current.second, las2, comp)) {} SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl( pair_type const& current, - iterator_type lst_1, iterator2_type lst_2, + iterator_type las1, iterator2_type las2, Compare comp, bool in_left ) : current(current) - , lst_1(lst_1), lst_2(lst_2) + , las1(las1), las2(las2) , comp(comp) , in_left(in_left) {} @@ -125,14 +125,14 @@ namespace sprout { using impl_type::check_in_left; protected: using impl_type::current; - using impl_type::lst_1; - using impl_type::lst_2; + using impl_type::las1; + using impl_type::las2; using impl_type::comp; private: using impl_type::in_left; private: SPROUT_CONSTEXPR set_symmetric_difference_iterator(set_symmetric_difference_iterator const& other, pair_type const& next) - : impl_type(next, other.lst_1, other.lst_2, other.comp) + : impl_type(next, other.las1, other.las2, other.comp) {} public: SPROUT_CONSTEXPR set_symmetric_difference_iterator() @@ -140,11 +140,11 @@ namespace sprout { {} set_symmetric_difference_iterator(set_symmetric_difference_iterator const&) = default; SPROUT_CONSTEXPR set_symmetric_difference_iterator( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp = Compare() ) - : impl_type(sprout::find_symmetric_difference(it1, lst_1, it2, lst_2, comp), lst_1, lst_2, comp) + : impl_type(sprout::find_symmetric_difference(it1, las1, it2, las2, comp), las1, las2, comp) {} template SPROUT_CONSTEXPR set_symmetric_difference_iterator(set_symmetric_difference_iterator const& it) @@ -160,13 +160,13 @@ namespace sprout { return current.first; } SPROUT_CONSTEXPR iterator_type last1() const { - return lst_1; + return las1; } SPROUT_CONSTEXPR iterator2_type base2() const { return current.second; } SPROUT_CONSTEXPR iterator2_type last2() const { - return lst_2; + return las2; } SPROUT_CONSTEXPR Compare compare() const { return comp; @@ -181,33 +181,33 @@ namespace sprout { return &*(*this); } SPROUT_CXX14_CONSTEXPR set_symmetric_difference_iterator& operator++() { - current = sprout::next_symmetric_difference(current.first, lst_1, current.second, lst_2, comp); - in_left = check_in_left(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp); + in_left = check_in_left(current.first, las1, current.second, las2, comp); return *this; } SPROUT_CXX14_CONSTEXPR set_symmetric_difference_iterator operator++(int) { set_symmetric_difference_iterator result(*this); - current = sprout::next_symmetric_difference(current.first, lst_1, current.second, lst_2, comp); - in_left = check_in_left(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp); + in_left = check_in_left(current.first, las1, current.second, las2, comp); return result; } SPROUT_CONSTEXPR set_symmetric_difference_iterator next() const { return set_symmetric_difference_iterator( *this, - sprout::next_symmetric_difference(current.first, lst_1, current.second, lst_2, comp) + sprout::next_symmetric_difference(current.first, las1, current.second, las2, comp) ); } SPROUT_CXX14_CONSTEXPR void swap(set_symmetric_difference_iterator& other) SPROUT_NOEXCEPT_IF( SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_1, other.lst_1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_2, other.lst_2)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) ) { sprout::swap(current, other.current); - sprout::swap(lst_1, other.lst_1); - sprout::swap(lst_2, other.lst_2); + sprout::swap(las1, other.las1); + sprout::swap(las2, other.las2); sprout::swap(comp, other.comp); sprout::swap(in_left, other.in_left); } @@ -241,13 +241,13 @@ namespace sprout { // template inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator - make_set_symmetric_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) { - return sprout::set_symmetric_difference_iterator(it1, lst_1, it2, lst_2, comp); + make_set_symmetric_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { + return sprout::set_symmetric_difference_iterator(it1, las1, it2, las2, comp); } template inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator - make_set_symmetric_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) { - return sprout::set_symmetric_difference_iterator(it1, lst_1, it2, lst_2); + make_set_symmetric_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { + return sprout::set_symmetric_difference_iterator(it1, las1, it2, las2); } // diff --git a/sprout/iterator/set_union_iterator.hpp b/sprout/iterator/set_union_iterator.hpp index f94a9a4f..b2697a29 100644 --- a/sprout/iterator/set_union_iterator.hpp +++ b/sprout/iterator/set_union_iterator.hpp @@ -55,48 +55,48 @@ namespace sprout { typedef sprout::pair pair_type; private: static SPROUT_CONSTEXPR bool check_in_left( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp ) { - return it1 != lst_1 ? (it2 != lst_2 ? comp(*it1, *it2) || !comp(*it2, *it1) : true) - : !(it2 != lst_2) + return it1 != las1 ? (it2 != las2 ? comp(*it1, *it2) || !comp(*it2, *it1) : true) + : !(it2 != las2) ; } protected: pair_type current; - iterator_type lst_1; - iterator2_type lst_2; + iterator_type las1; + iterator2_type las2; Compare comp; private: bool in_left; private: SPROUT_CONSTEXPR set_union_iterator(set_union_iterator const& other, pair_type const& next) : current(next) - , lst_1(other.lst_1), lst_2(other.lst_2) + , las1(other.las1), las2(other.las2) , comp(other.comp) - , in_left(check_in_left(next.first, other.lst_1, next.second, other.lst_2, other.comp)) + , in_left(check_in_left(next.first, other.las1, next.second, other.las2, other.comp)) {} public: SPROUT_CONSTEXPR set_union_iterator() - : current(), lst_1(), lst_2(), comp(), in_left(true) + : current(), las1(), las2(), comp(), in_left(true) {} set_union_iterator(set_union_iterator const&) = default; SPROUT_CONSTEXPR set_union_iterator( - iterator_type it1, iterator_type lst_1, - iterator2_type it2, iterator2_type lst_2, + iterator_type it1, iterator_type las1, + iterator2_type it2, iterator2_type las2, Compare comp = Compare() ) : current(it1, it2) - , lst_1(lst_1), lst_2(lst_2) + , las1(las1), las2(las2) , comp(comp) - , in_left(check_in_left(it1, lst_1, it2, lst_2, comp)) + , in_left(check_in_left(it1, las1, it2, las2, comp)) {} template SPROUT_CONSTEXPR set_union_iterator(set_union_iterator const& it) : current(it.base(), it.base2()) - , lst_1(it.last1()), lst_2(it.last2()) + , las1(it.last1()), las2(it.last2()) , comp(it.compare()) , in_left(it.is_in_left()) {} @@ -110,13 +110,13 @@ namespace sprout { return current.first; } SPROUT_CONSTEXPR iterator_type last1() const { - return lst_1; + return las1; } SPROUT_CONSTEXPR iterator2_type base2() const { return current.second; } SPROUT_CONSTEXPR iterator2_type last2() const { - return lst_2; + return las2; } SPROUT_CONSTEXPR Compare compare() const { return comp; @@ -131,33 +131,33 @@ namespace sprout { return &*(*this); } SPROUT_CXX14_CONSTEXPR set_union_iterator& operator++() { - current = sprout::next_union(current.first, lst_1, current.second, lst_2, comp); - in_left = check_in_left(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_union(current.first, las1, current.second, las2, comp); + in_left = check_in_left(current.first, las1, current.second, las2, comp); return *this; } SPROUT_CXX14_CONSTEXPR set_union_iterator operator++(int) { set_union_iterator result(*this); - current = sprout::next_union(current.first, lst_1, current.second, lst_2, comp); - in_left = check_in_left(current.first, lst_1, current.second, lst_2, comp); + current = sprout::next_union(current.first, las1, current.second, las2, comp); + in_left = check_in_left(current.first, las1, current.second, las2, comp); return result; } SPROUT_CONSTEXPR set_union_iterator next() const { return set_union_iterator( *this, - sprout::next_union(current.first, lst_1, current.second, lst_2, comp) + sprout::next_union(current.first, las1, current.second, las2, comp) ); } SPROUT_CXX14_CONSTEXPR void swap(set_union_iterator& other) SPROUT_NOEXCEPT_IF( SPROUT_NOEXCEPT_EXPR(sprout::swap(current, other.current)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_1, other.lst_1)) - && SPROUT_NOEXCEPT_EXPR(sprout::swap(lst_2, other.lst_2)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las1, other.las1)) + && SPROUT_NOEXCEPT_EXPR(sprout::swap(las2, other.las2)) && SPROUT_NOEXCEPT_EXPR(sprout::swap(comp, other.comp)) ) { sprout::swap(current, other.current); - sprout::swap(lst_1, other.lst_1); - sprout::swap(lst_2, other.lst_2); + sprout::swap(las1, other.las1); + sprout::swap(las2, other.las2); sprout::swap(comp, other.comp); sprout::swap(in_left, other.in_left); } @@ -191,13 +191,13 @@ namespace sprout { // template inline SPROUT_CONSTEXPR sprout::set_union_iterator - make_set_union_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) { - return sprout::set_union_iterator(it1, lst_1, it2, lst_2, comp); + make_set_union_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) { + return sprout::set_union_iterator(it1, las1, it2, las2, comp); } template inline SPROUT_CONSTEXPR sprout::set_union_iterator - make_set_union_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) { - return sprout::set_union_iterator(it1, lst_1, it2, lst_2); + make_set_union_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) { + return sprout::set_union_iterator(it1, las1, it2, las2); } // diff --git a/sprout/numeric/accumulate.hpp b/sprout/numeric/accumulate.hpp index 65083da1..bbaf8c1a 100644 --- a/sprout/numeric/accumulate.hpp +++ b/sprout/numeric/accumulate.hpp @@ -21,7 +21,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR T accumulate_ra( - RandomAccessIterator first, RandomAccessIterator last, BinaryOperation binary_op, + RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryOperation binary_op, typename std::iterator_traits::difference_type pivot, T const& init ) { @@ -43,7 +43,7 @@ namespace sprout { T >::type accumulate( - RandomAccessIterator first, RandomAccessIterator last, T init, BinaryOperation binary_op, + RandomAccessIterator const& first, RandomAccessIterator const& last, T init, BinaryOperation binary_op, std::random_access_iterator_tag* ) { @@ -60,7 +60,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair accumulate_impl_1( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -79,7 +79,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair accumulate_impl( sprout::pair const& current, - InputIterator last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n + InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits::difference_type n ) { return current.first == last ? current @@ -95,7 +95,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR T accumulate( - InputIterator first, InputIterator last, T init, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, T init, BinaryOperation binary_op, std::input_iterator_tag* ) { diff --git a/sprout/numeric/dft/detail/dft_element_gen.hpp b/sprout/numeric/dft/detail/dft_element_gen.hpp index 830428dd..08cedd51 100644 --- a/sprout/numeric/dft/detail/dft_element_gen.hpp +++ b/sprout/numeric/dft/detail/dft_element_gen.hpp @@ -20,7 +20,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_gen_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, typename std::iterator_traits::value_type::value_type arg, typename std::iterator_traits::difference_type pivot, typename std::iterator_traits::difference_type k = 0 @@ -41,7 +41,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_gen_impl( - RandomAccessIterator first, RandomAccessIterator last, + RandomAccessIterator const& first, RandomAccessIterator const& last, typename std::iterator_traits::value_type::value_type arg, std::random_access_iterator_tag* ) @@ -55,7 +55,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_gen_impl_1( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, typename std::iterator_traits::value_type::value_type arg, typename std::iterator_traits::difference_type k = 0, typename std::iterator_traits::value_type value @@ -80,7 +80,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_gen_impl( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, typename std::iterator_traits::value_type::value_type arg, std::input_iterator_tag* ) @@ -91,7 +91,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_gen( - InputIterator first, InputIterator last, + InputIterator const& first, InputIterator const& last, typename std::iterator_traits::value_type::value_type arg ) { diff --git a/sprout/numeric/dft/dft_element.hpp b/sprout/numeric/dft/dft_element.hpp index d0705bca..5830f64b 100644 --- a/sprout/numeric/dft/dft_element.hpp +++ b/sprout/numeric/dft/dft_element.hpp @@ -19,7 +19,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type dft_element_impl( - InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i, + InputIterator const& first, InputIterator const& last, typename std::iterator_traits::difference_type i, Size size ) { diff --git a/sprout/numeric/dft/fit/amplitude_spectrum.hpp b/sprout/numeric/dft/fit/amplitude_spectrum.hpp index cb5100ae..6727752d 100644 --- a/sprout/numeric/dft/fit/amplitude_spectrum.hpp +++ b/sprout/numeric/dft/fit/amplitude_spectrum.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type amplitude_spectrum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/dft/fit/dft.hpp b/sprout/numeric/dft/fit/dft.hpp index d81cfbd7..ad406e2a 100644 --- a/sprout/numeric/dft/fit/dft.hpp +++ b/sprout/numeric/dft/fit/dft.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type dft_impl( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/dft/fit/idft.hpp b/sprout/numeric/dft/fit/idft.hpp index a6e4f6a6..7bedcd0b 100644 --- a/sprout/numeric/dft/fit/idft.hpp +++ b/sprout/numeric/dft/fit/idft.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type idft_impl( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/dft/fit/phase_spectrum.hpp b/sprout/numeric/dft/fit/phase_spectrum.hpp index df5bb809..923caeec 100644 --- a/sprout/numeric/dft/fit/phase_spectrum.hpp +++ b/sprout/numeric/dft/fit/phase_spectrum.hpp @@ -25,7 +25,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type phase_spectrum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/dft/fixed/amplitude_spectrum.hpp b/sprout/numeric/dft/fixed/amplitude_spectrum.hpp index ab126e0f..d7c06535 100644 --- a/sprout/numeric/dft/fixed/amplitude_spectrum.hpp +++ b/sprout/numeric/dft/fixed/amplitude_spectrum.hpp @@ -31,7 +31,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type amplitude_spectrum_impl_ra( - RandomAccessIterator first, RandomAccessIterator, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type amplitude_spectrum( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -81,7 +81,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type amplitude_spectrum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) @@ -97,7 +97,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type amplitude_spectrum( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, std::forward_iterator_tag* ) { @@ -109,7 +109,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) { + amplitude_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::amplitude_spectrum(first, last, result, category()); } @@ -119,7 +119,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - amplitude_spectrum(InputIterator first, InputIterator last, Result const& result) { + amplitude_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_amplitude_spectrum_iterator(first), diff --git a/sprout/numeric/dft/fixed/dft.hpp b/sprout/numeric/dft/fixed/dft.hpp index 199a72fb..a78c4488 100644 --- a/sprout/numeric/dft/fixed/dft.hpp +++ b/sprout/numeric/dft/fixed/dft.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type dft_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -47,7 +47,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type dft( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -80,9 +80,9 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type dft_impl( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::size_type size, - ForwardIterator first_, typename sprout::container_traits::difference_type i, + ForwardIterator const& first_, typename sprout::container_traits::difference_type i, Args const&... args ) { @@ -97,7 +97,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type dft( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, std::forward_iterator_tag* ) { @@ -109,7 +109,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - dft(ForwardIterator first, ForwardIterator last, Result const& result) { + dft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::dft(first, last, result, category()); } @@ -119,7 +119,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - dft(ForwardIterator first, ForwardIterator last, Result const& result) { + dft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_dft_iterator(first, last), diff --git a/sprout/numeric/dft/fixed/idft.hpp b/sprout/numeric/dft/fixed/idft.hpp index 2a69af59..656741a0 100644 --- a/sprout/numeric/dft/fixed/idft.hpp +++ b/sprout/numeric/dft/fixed/idft.hpp @@ -29,7 +29,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type idft_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -47,7 +47,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type idft( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -80,9 +80,9 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type idft_impl( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, typename sprout::container_traits::size_type size, - ForwardIterator first_, typename sprout::container_traits::difference_type i, + ForwardIterator const& first_, typename sprout::container_traits::difference_type i, Args const&... args ) { @@ -97,7 +97,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type idft( - ForwardIterator first, ForwardIterator last, Result const& result, + ForwardIterator const& first, ForwardIterator const& last, Result const& result, std::forward_iterator_tag* ) { @@ -109,7 +109,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - idft(ForwardIterator first, ForwardIterator last, Result const& result) { + idft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::idft(first, last, result, category()); } @@ -119,7 +119,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - idft(ForwardIterator first, ForwardIterator last, Result const& result) { + idft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_idft_iterator(first, last), diff --git a/sprout/numeric/dft/fixed/phase_spectrum.hpp b/sprout/numeric/dft/fixed/phase_spectrum.hpp index 18a6cc98..db0e0993 100644 --- a/sprout/numeric/dft/fixed/phase_spectrum.hpp +++ b/sprout/numeric/dft/fixed/phase_spectrum.hpp @@ -31,7 +31,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type phase_spectrum_impl_ra( - RandomAccessIterator first, RandomAccessIterator, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result, sprout::index_tuple, typename sprout::container_traits::difference_type offset, typename sprout::container_traits::size_type size, @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type phase_spectrum( - RandomAccessIterator first, RandomAccessIterator last, Result const& result, + RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result, std::random_access_iterator_tag* ) { @@ -81,7 +81,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type phase_spectrum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, Args const&... args ) @@ -97,7 +97,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm::type phase_spectrum( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, std::forward_iterator_tag* ) { @@ -109,7 +109,7 @@ namespace sprout { sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - phase_spectrum(InputIterator first, InputIterator last, Result const& result) { + phase_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { typedef typename std::iterator_traits::iterator_category* category; return sprout::fixed::detail::phase_spectrum(first, last, result, category()); } @@ -119,7 +119,7 @@ namespace sprout { !sprout::is_fixed_container::value, typename sprout::fixed::results::algorithm::type >::type - phase_spectrum(InputIterator first, InputIterator last, Result const& result) { + phase_spectrum(InputIterator const& first, InputIterator const& last, Result const& result) { return sprout::remake( result, sprout::size(result), sprout::make_phase_spectrum_iterator(first), diff --git a/sprout/numeric/dft/idft_element.hpp b/sprout/numeric/dft/idft_element.hpp index c73bb251..37bcc2e7 100644 --- a/sprout/numeric/dft/idft_element.hpp +++ b/sprout/numeric/dft/idft_element.hpp @@ -19,7 +19,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type idft_element_impl( - InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i, + InputIterator const& first, InputIterator const& last, typename std::iterator_traits::difference_type i, Size size ) { diff --git a/sprout/numeric/fit/adjacent_difference.hpp b/sprout/numeric/fit/adjacent_difference.hpp index 8e1f6943..dc3bc051 100644 --- a/sprout/numeric/fit/adjacent_difference.hpp +++ b/sprout/numeric/fit/adjacent_difference.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type adjacent_difference_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type adjacent_difference_impl( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/fit/partial_sum.hpp b/sprout/numeric/fit/partial_sum.hpp index b574e98e..dbff883a 100644 --- a/sprout/numeric/fit/partial_sum.hpp +++ b/sprout/numeric/fit/partial_sum.hpp @@ -24,7 +24,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type partial_sum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::difference_type offset ) { @@ -49,7 +49,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm::type partial_sum_impl( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::difference_type offset ) { diff --git a/sprout/numeric/fixed/adjacent_difference.hpp b/sprout/numeric/fixed/adjacent_difference.hpp index 82d4e3a0..b3c7607a 100644 --- a/sprout/numeric/fixed/adjacent_difference.hpp +++ b/sprout/numeric/fixed/adjacent_difference.hpp @@ -28,7 +28,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator, InputIterator, Result const& result, + InputIterator const&, InputIterator const&, Result const& result, typename sprout::container_traits::size_type, typename sprout::container_traits::value_type const&, Args const&... args @@ -42,7 +42,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, typename sprout::container_traits::value_type const& value, Args const&... args @@ -71,7 +71,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size ) { @@ -102,7 +102,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator, InputIterator, Result const& result, BinaryOperation, + InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, typename sprout::container_traits::size_type, typename sprout::container_traits::value_type const&, Args const&... args @@ -116,7 +116,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::size_type size, typename sprout::container_traits::value_type const& value, Args const&... args @@ -145,7 +145,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type adjacent_difference_impl_1( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::size_type size ) { diff --git a/sprout/numeric/fixed/partial_sum.hpp b/sprout/numeric/fixed/partial_sum.hpp index 9b1f154c..c499b34a 100644 --- a/sprout/numeric/fixed/partial_sum.hpp +++ b/sprout/numeric/fixed/partial_sum.hpp @@ -28,7 +28,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl_1( - InputIterator, InputIterator, Result const& result, + InputIterator const&, InputIterator const&, Result const& result, typename sprout::container_traits::size_type, typename sprout::container_traits::value_type const& value, Args const&... args @@ -42,7 +42,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl_1( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size, typename sprout::container_traits::value_type const& value, Args const&... args @@ -71,7 +71,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl( - InputIterator first, InputIterator last, Result const& result, + InputIterator const& first, InputIterator const& last, Result const& result, typename sprout::container_traits::size_type size ) { @@ -102,7 +102,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl_1( - InputIterator, InputIterator, Result const& result, BinaryOperation, + InputIterator const&, InputIterator const&, Result const& result, BinaryOperation, typename sprout::container_traits::size_type, typename sprout::container_traits::value_type const& value, Args const&... args @@ -116,7 +116,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl_1( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::size_type size, typename sprout::container_traits::value_type const& value, Args const&... args @@ -145,7 +145,7 @@ namespace sprout { typename sprout::fixed::results::algorithm::type >::type partial_sum_impl( - InputIterator first, InputIterator last, Result const& result, BinaryOperation binary_op, + InputIterator const& first, InputIterator const& last, Result const& result, BinaryOperation binary_op, typename sprout::container_traits::size_type size ) { diff --git a/sprout/weed/detail/find_character_set.hpp b/sprout/weed/detail/find_character_set.hpp index ccd26f5c..23941295 100644 --- a/sprout/weed/detail/find_character_set.hpp +++ b/sprout/weed/detail/find_character_set.hpp @@ -22,8 +22,8 @@ namespace sprout { template inline SPROUT_CONSTEXPR RandomAccessIterator find_character_set_impl_ra( - RandomAccessIterator first, RandomAccessIterator last, T const& value, - typename std::iterator_traits::difference_type pivot, RandomAccessIterator found + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, + typename std::iterator_traits::difference_type pivot, RandomAccessIterator const& found ) { return found != first ? found @@ -48,7 +48,7 @@ namespace sprout { RandomAccessIterator >::type find_character_set( - RandomAccessIterator first, RandomAccessIterator last, T const& value, + RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value, std::random_access_iterator_tag* ) { @@ -61,7 +61,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_character_set_impl_1( sprout::pair const& current, - BidirectionalIterator last, T const& value, typename std::iterator_traits::difference_type n + BidirectionalIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { typedef sprout::pair type; @@ -83,7 +83,7 @@ namespace sprout { inline SPROUT_CONSTEXPR sprout::pair find_character_set_impl( sprout::pair const& current, - BidirectionalIterator last, T const& value, typename std::iterator_traits::difference_type n + BidirectionalIterator const& last, T const& value, typename std::iterator_traits::difference_type n ) { return current.second || current.first == last ? current @@ -99,7 +99,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR BidirectionalIterator find_character_set( - BidirectionalIterator first, BidirectionalIterator last, T const& value, + BidirectionalIterator const& first, BidirectionalIterator const& last, T const& value, std::input_iterator_tag* ) { @@ -109,7 +109,7 @@ namespace sprout { template inline SPROUT_CONSTEXPR BidirectionalIterator - find_character_set(BidirectionalIterator first, BidirectionalIterator last, T const& value) { + find_character_set(BidirectionalIterator const& first, BidirectionalIterator const& last, T const& value) { typedef typename std::iterator_traits::iterator_category* category; return sprout::weed::detail::find_character_set(first, last, value, category()); } diff --git a/sprout/weed/parser/auxiliary/eoi.hpp b/sprout/weed/parser/auxiliary/eoi.hpp index 4ecd659f..ffa7cd2e 100644 --- a/sprout/weed/parser/auxiliary/eoi.hpp +++ b/sprout/weed/parser/auxiliary/eoi.hpp @@ -35,8 +35,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { diff --git a/sprout/weed/parser/auxiliary/eol.hpp b/sprout/weed/parser/auxiliary/eol.hpp index 66d0c91d..97675be0 100644 --- a/sprout/weed/parser/auxiliary/eol.hpp +++ b/sprout/weed/parser/auxiliary/eol.hpp @@ -37,8 +37,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { diff --git a/sprout/weed/parser/char/char.hpp b/sprout/weed/parser/char/char.hpp index 873206f2..311ccbc9 100644 --- a/sprout/weed/parser/char/char.hpp +++ b/sprout/weed/parser/char/char.hpp @@ -53,8 +53,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -110,8 +109,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -151,8 +149,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -191,8 +188,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -223,8 +219,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { diff --git a/sprout/weed/parser/char/char_class.hpp b/sprout/weed/parser/char/char_class.hpp index 0179f07c..e6361ca9 100644 --- a/sprout/weed/parser/char/char_class.hpp +++ b/sprout/weed/parser/char/char_class.hpp @@ -40,8 +40,7 @@ namespace sprout { public: \ template \ SPROUT_CONSTEXPR typename result::type operator()( \ - Iterator first, \ - Iterator last, \ + Iterator first, Iterator last, \ Context const& \ ) const \ { \ diff --git a/sprout/weed/parser/numeric/int_p.hpp b/sprout/weed/parser/numeric/int_p.hpp index f3bcf5fb..424a819a 100644 --- a/sprout/weed/parser/numeric/int_p.hpp +++ b/sprout/weed/parser/numeric/int_p.hpp @@ -66,8 +66,7 @@ namespace sprout { N == limit_digits, typename result::type >::type call_1( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, IntType t, std::size_t n, @@ -79,8 +78,7 @@ namespace sprout { return sprout::tuples::get<1>(res) ? n < MaxDigits ? call_0( - sprout::next(first), - last, + sprout::next(first), last, temp_first, static_cast(t * Radix + sprout::tuples::get<0>(res)), n @@ -100,8 +98,7 @@ namespace sprout { N != limit_digits, typename result::type >::type call_1( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, IntType t, std::size_t n, @@ -112,8 +109,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return sprout::tuples::get<1>(res) ? call_0( - sprout::next(first), - last, + sprout::next(first), last, temp_first, static_cast(t * Radix + sprout::tuples::get<0>(res)), n @@ -125,8 +121,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call_0( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, IntType t, std::size_t n @@ -136,8 +131,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return first != last ? call_1( - first, - last, + first, last, temp_first, t, n + 1, @@ -150,8 +144,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call_i( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, PResult const& res ) const @@ -160,8 +153,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return sprout::tuples::get<1>(res) ? call_0<1, Context>( - sprout::next(first), - last, + sprout::next(first), last, temp_first, sprout::tuples::get<0>(res), 1 @@ -171,8 +163,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, int sign = 0 ) const @@ -182,8 +173,7 @@ namespace sprout { return first != last ? make_result( call_i( - first, - last, + first, last, temp_first, sprout::weed::detail::from_ndigit(*first) ), @@ -195,8 +185,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -206,21 +195,18 @@ namespace sprout { return first != last ? *first == SPROUT_CHAR_LITERAL('+', elem_type) ? call( - sprout::next(first), - last, + sprout::next(first), last, first, 1 ) : *first == SPROUT_CHAR_LITERAL('-', elem_type) ? call( - sprout::next(first), - last, + sprout::next(first), last, first, -1 ) : call( - first, - last, + first, last, first ) : result_type(false, first, attribute_type()) diff --git a/sprout/weed/parser/numeric/uint_p.hpp b/sprout/weed/parser/numeric/uint_p.hpp index 391bfa87..903c216a 100644 --- a/sprout/weed/parser/numeric/uint_p.hpp +++ b/sprout/weed/parser/numeric/uint_p.hpp @@ -65,8 +65,7 @@ namespace sprout { N == limit_digits, typename result::type >::type call_1( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, UIntType t, std::size_t n, @@ -78,8 +77,7 @@ namespace sprout { return sprout::tuples::get<1>(res) ? n < MaxDigits ? call_0( - sprout::next(first), - last, + sprout::next(first), last, temp_first, static_cast(t * Radix + sprout::tuples::get<0>(res)), n @@ -99,8 +97,7 @@ namespace sprout { N != limit_digits, typename result::type >::type call_1( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, UIntType t, std::size_t n, @@ -111,8 +108,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return sprout::tuples::get<1>(res) ? call_0( - sprout::next(first), - last, + sprout::next(first), last, temp_first, static_cast(t * Radix + sprout::tuples::get<0>(res)), n @@ -124,8 +120,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call_0( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, UIntType t, std::size_t n @@ -135,8 +130,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return first != last ? call_1( - first, - last, + first, last, temp_first, t, n + 1, @@ -149,8 +143,7 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call_i( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first, PResult const& res ) const @@ -159,8 +152,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return sprout::tuples::get<1>(res) ? call_0<1, Context>( - sprout::next(first), - last, + sprout::next(first), last, temp_first, sprout::tuples::get<0>(res), 1 @@ -170,14 +162,12 @@ namespace sprout { } template SPROUT_CONSTEXPR typename result::type call( - Iterator first, - Iterator last, + Iterator first, Iterator last, Iterator temp_first ) const { return call_i( - first, - last, + first, last, temp_first, sprout::weed::detail::from_ndigit(*first) ); @@ -185,8 +175,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -194,8 +183,7 @@ namespace sprout { typedef typename attribute::type attribute_type; return first != last ? call( - first, - last, + first, last, first ) : result_type(false, first, attribute_type()) diff --git a/sprout/weed/parser/string/string.hpp b/sprout/weed/parser/string/string.hpp index 3f266aca..d25429f0 100644 --- a/sprout/weed/parser/string/string.hpp +++ b/sprout/weed/parser/string/string.hpp @@ -52,8 +52,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const { @@ -125,8 +124,7 @@ namespace sprout { {} template SPROUT_CONSTEXPR typename result::type operator()( - Iterator first, - Iterator last, + Iterator first, Iterator last, Context const& ) const {