mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-05-12 09:33:30 +00:00
fix iterator parameter
This commit is contained in:
parent
6e8b5ea395
commit
802f2fbaed
111 changed files with 607 additions and 633 deletions
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename RandomAccessIterator>
|
||||
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<typename RandomAccessIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
adjacent_find_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, RandomAccessIterator found
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::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<typename ForwardIterator>
|
||||
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<ForwardIterator, ForwardIterator>
|
||||
adjacent_find_impl_1(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, BinaryPredicate pred, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<ForwardIterator, ForwardIterator> type;
|
||||
|
@ -98,7 +98,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
adjacent_find_impl(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, BinaryPredicate pred, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, BinaryPredicate pred, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second == last ? current
|
||||
|
@ -114,7 +114,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
adjacent_find(
|
||||
ForwardIterator first, ForwardIterator last, BinaryPredicate pred,
|
||||
ForwardIterator const& first, ForwardIterator const& last, BinaryPredicate pred,
|
||||
std::forward_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
all_of_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
all_of_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return !current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
all_of(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
all_of_equal_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
all_of_equal_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return !current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
any_of_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
any_of_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
any_of(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
any_of_equal_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
any_of_equal_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
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
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
count_impl_ra(
|
||||
RandomAccessIterator first, T const& value,
|
||||
RandomAccessIterator const& first, T const& value,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type size
|
||||
)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
count_impl_1(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
count_impl(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count(
|
||||
InputIterator first, InputIterator last, T const& value,
|
||||
InputIterator const& first, InputIterator const& last, T const& value,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
count_if_impl_ra(
|
||||
RandomAccessIterator first, Predicate pred,
|
||||
RandomAccessIterator const& first, Predicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type size
|
||||
)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
count_if_impl_1(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
count_if_impl(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count_if(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
equal_range(
|
||||
ForwardIterator first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
ForwardIterator const& first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
T const& value, Compare comp
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
find_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, T const& value,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, RandomAccessIterator found
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, T const& value,
|
||||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, bool>
|
||||
find_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
find_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second || current.first == last ? current
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
find_if_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Predicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, RandomAccessIterator found
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, bool>
|
||||
find_if_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
find_if_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second || current.first == last ? current
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR InputIterator
|
||||
find_if(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
find_if_not_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Predicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, RandomAccessIterator found
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Predicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, bool>
|
||||
find_if_not_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
find_if_not_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second || current.first == last ? current
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<InputIterator>::value_type const& low,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& high,
|
||||
Compare comp,
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
copy_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
template<typename BidirectionalIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
copy_backward_impl(
|
||||
BidirectionalIterator first, BidirectionalIterator last, Result const& result,
|
||||
BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Size, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
copy_n_impl(
|
||||
InputIterator first, Size n, Result const& result,
|
||||
InputIterator const& first, Size n, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
template<typename BidirectionalIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
reverse_copy_impl(
|
||||
BidirectionalIterator first, BidirectionalIterator last, Result const& result,
|
||||
BidirectionalIterator const& first, BidirectionalIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
template<typename BidirectionalIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename UnaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
unique_copy_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Compare, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
clamp_range_copy_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator, Result const& result,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type const& low,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type const& high,
|
||||
Compare comp,
|
||||
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
clamp_range_copy(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type const& low,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type const& high,
|
||||
Compare comp,
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value_type const& low,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& high,
|
||||
Compare comp,
|
||||
|
@ -111,7 +111,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
clamp_range_copy(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& low,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& high,
|
||||
Compare comp,
|
||||
|
@ -127,7 +127,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value_type const& low,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& high,
|
||||
Compare comp
|
||||
|
@ -143,7 +143,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value_type const& low,
|
||||
typename std::iterator_traits<InputIterator>::value_type const& high,
|
||||
Compare comp
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
copy_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -47,7 +47,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
copy_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -92,7 +92,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::copy(first, last, result, category());
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
copy(InputIterator first, InputIterator last, Result const& result) {
|
||||
copy(InputIterator const& first, InputIterator const& last, Result const& result) {
|
||||
return sprout::remake<Result>(
|
||||
result, sprout::size(result),
|
||||
first, last
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
copy_backward_impl_ra(
|
||||
RandomAccessIterator, RandomAccessIterator last, Result const& result,
|
||||
RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -47,7 +47,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename BidirectionalIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<BidirectionalIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::copy_backward(first, last, result, category());
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::static_size == sizeof...(Args),
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_filter_iterator(pred, first, last),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Size, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
copy_n_impl(
|
||||
InputIterator first, Size n, Result const& result,
|
||||
InputIterator const& first, Size n, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -67,7 +67,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Size, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::copy_n(first, n, result, category());
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value, "Sorry, not implemented.");
|
||||
return sprout::fixed::copy(first, sprout::next(first, n), result);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::copy_until(first, last, result, pred, category());
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_while_iterator(sprout::not1(pred), first, last),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -68,7 +68,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::copy_while(first, last, result, pred, category());
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_while_iterator(pred, first, last),
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace sprout {
|
|||
template<typename Container, typename RandomAccessIterator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::value_type const&
|
||||
sort_select_pivot(
|
||||
RandomAccessIterator origin,
|
||||
RandomAccessIterator const& origin,
|
||||
typename sprout::container_traits<Container>::difference_type start,
|
||||
typename sprout::container_traits<Container>::difference_type end
|
||||
)
|
||||
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
template<typename Container, typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
|
||||
sort_find_l(
|
||||
RandomAccessIterator origin,
|
||||
RandomAccessIterator const& origin,
|
||||
Compare comp,
|
||||
typename sprout::container_traits<Container>::difference_type l,
|
||||
typename sprout::container_traits<Container>::value_type const& p
|
||||
|
@ -67,7 +67,7 @@ namespace sprout {
|
|||
template<typename Container, typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
|
||||
sort_find_r(
|
||||
RandomAccessIterator origin,
|
||||
RandomAccessIterator const& origin,
|
||||
Compare comp,
|
||||
typename sprout::container_traits<Container>::difference_type r,
|
||||
typename sprout::container_traits<Container>::value_type const& p
|
||||
|
|
|
@ -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<Result>(
|
||||
|
@ -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<Result>(
|
||||
|
@ -80,7 +80,12 @@ namespace sprout {
|
|||
}
|
||||
template<typename Result, typename Container, typename Compare, typename BidirectionalIterator>
|
||||
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<Result>(
|
||||
cont, comp, first, last,
|
||||
|
@ -90,7 +95,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Result, typename Container, typename Compare, typename BidirectionalIterator>
|
||||
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<Result>(
|
||||
cont, comp, first, last,
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
partition_copy_impl(
|
||||
InputIterator, InputIterator, Result const& result, Predicate,
|
||||
InputIterator const&, InputIterator const&, Result const& result, Predicate,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
|
|
@ -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<Result>(
|
||||
|
@ -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<Result>(
|
||||
|
@ -80,7 +80,12 @@ namespace sprout {
|
|||
}
|
||||
template<typename Result, typename Container, typename Compare, typename BidirectionalIterator>
|
||||
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<Result>(
|
||||
cont, comp, first, last,
|
||||
|
@ -90,7 +95,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Result, typename Container, typename Compare, typename BidirectionalIterator>
|
||||
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<Result>(
|
||||
cont, comp, first, last,
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
remove_copy_impl(
|
||||
InputIterator, InputIterator,
|
||||
InputIterator const&, InputIterator const&,
|
||||
Result const& result, T const&,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Args const&... args
|
||||
|
@ -43,7 +43,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -62,7 +62,7 @@ namespace sprout {
|
|||
sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_remove_iterator(value, first, last),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
remove_copy_if_impl(
|
||||
InputIterator, InputIterator,
|
||||
InputIterator const&, InputIterator const&,
|
||||
Result const& result, Predicate,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Args const&... args
|
||||
|
@ -43,7 +43,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -62,7 +62,7 @@ namespace sprout {
|
|||
sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_remove_if_iterator(pred, first, last),
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename T, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -101,7 +101,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_replace_iterator(first, old_value, new_value),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Predicate, typename T, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
|
@ -48,7 +48,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename Predicate, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -100,7 +100,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename Predicate, typename T>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_replace_if_iterator(first, pred, new_value),
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
reverse_copy_impl_ra(
|
||||
RandomAccessIterator, RandomAccessIterator last, Result const& result,
|
||||
RandomAccessIterator const&, RandomAccessIterator const& last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -46,7 +46,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename BidirectionalIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<BidirectionalIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::reverse_copy(first, last, result, category());
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_reverse_iterator(last),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
rotate_copy_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator middle,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& middle,
|
||||
typename sprout::container_traits<Result>::size_type last_half_size,
|
||||
Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
rotate_copy_impl_1(
|
||||
ForwardIterator first, ForwardIterator last,
|
||||
ForwardIterator const& first, ForwardIterator const& last,
|
||||
Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -121,8 +121,8 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -136,7 +136,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<ForwardIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::rotate_copy(first, middle, last, result, category());
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_joint_iterator(middle, last, first, first),
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
stable_partition_copy_impl_1(
|
||||
BidirectionalIterator, BidirectionalIterator,
|
||||
BidirectionalIterator const&, BidirectionalIterator const&,
|
||||
Result const& result, Predicate,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Args const&... args
|
||||
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -81,10 +81,10 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::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<Result>::size_type size,
|
||||
BidirectionalIterator temp_first,
|
||||
BidirectionalIterator const& temp_first,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
|
|
|
@ -28,9 +28,9 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -53,9 +53,9 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -109,9 +109,9 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename UnaryOperation, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
transform_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const&,
|
||||
Result const& result, UnaryOperation op,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, typename UnaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
transform_impl(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
Result const& result, UnaryOperation op,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -98,7 +98,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename UnaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::transform(first, last, result, op, category());
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_transform_iterator(first, op),
|
||||
|
@ -148,7 +148,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Result, typename BinaryOperation, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
transform_impl_ra(
|
||||
RandomAccessIterator1 first1, RandomAccessIterator1, RandomAccessIterator2 first2,
|
||||
RandomAccessIterator1 const& first1, RandomAccessIterator1 const&, RandomAccessIterator2 first2,
|
||||
Result const& result, BinaryOperation op,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
|
@ -167,7 +167,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
|
@ -215,7 +215,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename InputIterator2, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator1, InputIterator2>::type* category;
|
||||
return sprout::fixed::detail::transform(first1, last1, first2, result, op, category());
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_transform_iterator(first1, first2, op),
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
unique_copy_impl(
|
||||
InputIterator, InputIterator,
|
||||
InputIterator const&, InputIterator const&,
|
||||
Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Head const& head,
|
||||
|
@ -45,7 +45,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
unique_copy_impl(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
Head const& head,
|
||||
|
@ -65,7 +65,7 @@ namespace sprout {
|
|||
sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value, "Sorry, not implemented.");
|
||||
return sprout::remake<Result>(
|
||||
result, sprout::size(result),
|
||||
|
@ -108,7 +108,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
unique_copy_impl(
|
||||
InputIterator, InputIterator,
|
||||
InputIterator const&, InputIterator const&,
|
||||
Result const& result, BinaryPredicate,
|
||||
typename sprout::container_traits<Result>::size_type,
|
||||
Head const& head,
|
||||
|
@ -123,7 +123,7 @@ namespace sprout {
|
|||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
unique_copy_impl(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
Result const& result, BinaryPredicate pred,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
Head const& head,
|
||||
|
@ -143,7 +143,7 @@ namespace sprout {
|
|||
sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::value, "Sorry, not implemented.");
|
||||
return sprout::remake<Result>(
|
||||
result, sprout::size(result),
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, T>
|
||||
fold_until_impl_1(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, T> type;
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, T>
|
||||
fold_until_impl(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last || pred(current.second) ? current
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, T>
|
||||
fold_while_impl_1(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, T> type;
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, T>
|
||||
fold_while_impl(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last || !pred(current.second) ? current
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
is_heap_until_impl(
|
||||
RandomAccessIterator it, Compare comp,
|
||||
RandomAccessIterator const& it, Compare comp,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type first, typename std::iterator_traits<RandomAccessIterator>::difference_type last,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, typename std::iterator_traits<RandomAccessIterator>::difference_type found
|
||||
)
|
||||
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Compare>
|
||||
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<RandomAccessIterator>::difference_type size
|
||||
)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
is_partitioned_impl_1(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -67,7 +67,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
is_partitioned_impl(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second > 1 || current.first == last ? current
|
||||
|
@ -83,7 +83,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_partitioned(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,16 +24,16 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename Difference, typename ForwardIterator, typename BinaryPredicate>
|
||||
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<typename RandomAccessIterator1, typename RandomAccessIterator2, typename BinaryPredicate>
|
||||
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<RandomAccessIterator1>::difference_type size
|
||||
)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ namespace sprout {
|
|||
bool
|
||||
>::type
|
||||
is_permutation(
|
||||
sprout::pair<RandomAccessIterator1, RandomAccessIterator2> first, RandomAccessIterator1 last1, BinaryPredicate pred,
|
||||
sprout::pair<RandomAccessIterator1, RandomAccessIterator2> first, RandomAccessIterator1 const& last1, BinaryPredicate pred,
|
||||
std::random_access_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, bool>
|
||||
is_permutation_impl_1(
|
||||
sprout::pair<ForwardIterator1, bool> 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<ForwardIterator1>::difference_type n
|
||||
)
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
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<ForwardIterator1>::difference_type size
|
||||
)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_permutation(
|
||||
sprout::pair<ForwardIterator1, ForwardIterator2> first, ForwardIterator1 last1, BinaryPredicate pred,
|
||||
sprout::pair<ForwardIterator1, ForwardIterator2> 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<RandomAccessIterator1, RandomAccessIterator2> 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<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate, typename Difference1, typename Difference2>
|
||||
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<ForwardIterator1, ForwardIterator2> 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<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Compare>
|
||||
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<RandomAccessIterator>::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<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
is_sorted(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Compare comp,
|
||||
std::forward_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR RandomAccessIterator
|
||||
is_sorted_until_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Compare comp,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot, RandomAccessIterator found
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Compare comp,
|
||||
typename std::iterator_traits<RandomAccessIterator>::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<ForwardIterator, ForwardIterator>
|
||||
is_sorted_until_impl_1(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<ForwardIterator, ForwardIterator> type;
|
||||
|
@ -83,7 +83,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
is_sorted_until_impl(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second == last ? current
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Compare>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
lower_bound(
|
||||
ForwardIterator first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
ForwardIterator const& first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
T const& value, Compare comp
|
||||
)
|
||||
{
|
||||
|
|
|
@ -21,14 +21,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
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<typename RandomAccessIterator, typename Compare>
|
||||
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<RandomAccessIterator>::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<ForwardIterator, ForwardIterator>
|
||||
max_element_impl_1(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<ForwardIterator, ForwardIterator> type;
|
||||
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
max_element_impl(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -103,7 +103,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
max_element(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Compare comp,
|
||||
std::forward_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -21,14 +21,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename ForwardIterator, typename Compare>
|
||||
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<typename RandomAccessIterator, typename Compare>
|
||||
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<RandomAccessIterator>::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<ForwardIterator, ForwardIterator>
|
||||
min_element_impl_1(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<ForwardIterator, ForwardIterator> type;
|
||||
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
min_element_impl(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -103,7 +103,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
min_element(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Compare comp,
|
||||
std::forward_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename ForwardIteratorPair, typename ForwardIterator, typename Compare>
|
||||
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<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
iter_minmax(ForwardIterator a, ForwardIterator b, Compare comp) {
|
||||
iter_minmax(ForwardIterator const& a, ForwardIterator const& b, Compare comp) {
|
||||
typedef sprout::pair<ForwardIterator, ForwardIterator> type;
|
||||
return comp(*b, *a)
|
||||
? type(b, a)
|
||||
|
@ -48,7 +48,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<RandomAccessIterator, RandomAccessIterator>
|
||||
minmax_element_impl_ra(
|
||||
RandomAccessIterator first, Compare comp,
|
||||
RandomAccessIterator const& first, Compare comp,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type half
|
||||
)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ namespace sprout {
|
|||
sprout::pair<RandomAccessIterator, RandomAccessIterator>
|
||||
>::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<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> >
|
||||
minmax_element_impl_3(
|
||||
sprout::pair<ForwardIterator, ForwardIterator> minmax,
|
||||
ForwardIterator first, ForwardIterator next,
|
||||
ForwardIterator last, Compare comp) {
|
||||
ForwardIterator const& first, ForwardIterator const& next,
|
||||
ForwardIterator const& last, Compare comp) {
|
||||
typedef sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> > type;
|
||||
return next == last
|
||||
? type(
|
||||
|
@ -121,7 +121,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> >
|
||||
minmax_element_impl_1(
|
||||
sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> > const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -142,7 +142,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> >
|
||||
minmax_element_impl(
|
||||
sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> > const& current,
|
||||
ForwardIterator last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
ForwardIterator const& last, Compare comp, typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -159,7 +159,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, sprout::pair<ForwardIterator, ForwardIterator> >
|
||||
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<ForwardIterator, ForwardIterator> type;
|
||||
|
@ -171,7 +171,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator, ForwardIterator>
|
||||
minmax_element(
|
||||
ForwardIterator first, ForwardIterator last, Compare comp,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Compare comp,
|
||||
std::forward_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
none_of_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
none_of_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return !current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
none_of(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
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<RandomAccessIterator>::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<InputIterator, bool>
|
||||
none_of_equal_impl_1(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, bool> type;
|
||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, bool>
|
||||
none_of_equal_impl(
|
||||
sprout::pair<InputIterator, bool> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return !current.second || current.first == last ? current
|
||||
|
@ -89,7 +89,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<RandomAccessIterator>::difference_type pivot
|
||||
)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Predicate>
|
||||
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<RandomAccessIterator>::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<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
one_of_impl_1(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
one_of_impl(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, Predicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second > 1 || current.first == last ? current
|
||||
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
one_of(
|
||||
InputIterator first, InputIterator last, Predicate pred,
|
||||
InputIterator const& first, InputIterator const& last, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
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<RandomAccessIterator>::difference_type pivot
|
||||
)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T>
|
||||
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<RandomAccessIterator>::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<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
one_of_equal_impl_1(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
one_of_equal_impl(
|
||||
sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, T const& value, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.second > 1 || current.first == last ? current
|
||||
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename ForwardIterator, typename Predicate>
|
||||
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,
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
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<RandomAccessIterator1>::difference_type pivot, RandomAccessIterator1 last1_, RandomAccessIterator1 searched
|
||||
typename std::iterator_traits<RandomAccessIterator1>::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<typename ForwardIterator1>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, bool>
|
||||
search_impl_fork(sprout::pair<ForwardIterator1, bool> const& current, ForwardIterator1 last1, ForwardIterator1 searched) {
|
||||
search_impl_fork(sprout::pair<ForwardIterator1, bool> const& current, ForwardIterator1 const& last1, ForwardIterator1 const& searched) {
|
||||
typedef sprout::pair<ForwardIterator1, bool> 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<ForwardIterator1, bool>
|
||||
search_impl_1(
|
||||
sprout::pair<ForwardIterator1, bool> 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<ForwardIterator1>::difference_type n
|
||||
)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, bool>
|
||||
search_impl(
|
||||
sprout::pair<ForwardIterator1, bool> 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<ForwardIterator1>::difference_type n
|
||||
)
|
||||
{
|
||||
|
@ -112,8 +112,8 @@ namespace sprout {
|
|||
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
|
||||
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*
|
||||
)
|
||||
|
|
|
@ -21,10 +21,10 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Size, typename T, typename BinaryPredicate>
|
||||
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<RandomAccessIterator>::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<ForwardIterator, ForwardIterator, Size> 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<ForwardIterator, ForwardIterator, Size>
|
||||
search_n_impl_1(
|
||||
sprout::tuple<ForwardIterator, ForwardIterator, Size> current,
|
||||
ForwardIterator last, Size count, T const& value, BinaryPredicate pred,
|
||||
ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred,
|
||||
typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::tuple<ForwardIterator, ForwardIterator, Size>
|
||||
search_n_impl(
|
||||
sprout::tuple<ForwardIterator, ForwardIterator, Size> current,
|
||||
ForwardIterator last, Size count, T const& value, BinaryPredicate pred,
|
||||
ForwardIterator const& last, Size count, T const& value, BinaryPredicate pred,
|
||||
typename std::iterator_traits<ForwardIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Size, typename T, typename BinaryPredicate>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -105,8 +105,8 @@ namespace sprout {
|
|||
template<typename Result, typename ContIterator, typename SizeIterator, typename Sizes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Result>::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<typename Result, typename ContIterator, sprout::index_t... Indexes, typename Sizes>
|
||||
inline SPROUT_CONSTEXPR Result
|
||||
join_impl_ra_1(
|
||||
ContIterator first_cont,
|
||||
ContIterator const& first_cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
Sizes const& sizes
|
||||
)
|
||||
|
@ -156,7 +156,7 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<typename Result, typename ContIterator, typename... Args>
|
||||
|
@ -164,7 +164,7 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<typename Result, typename ContIterator, typename InputIterator, typename... Args>
|
||||
|
@ -184,8 +184,8 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<Result>::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<typename Result, typename ContIterator, typename SepIterator, typename SizeIterator, typename Sizes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::container_traits<Result>::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<typename Result, typename ContIterator, typename SepIterator, sprout::index_t... Indexes, typename Sizes>
|
||||
inline SPROUT_CONSTEXPR Result
|
||||
join_impl_ra_1(
|
||||
ContIterator first_cont,
|
||||
SepIterator first,
|
||||
ContIterator const& first_cont,
|
||||
SepIterator const& first,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
Sizes const& sizes
|
||||
)
|
||||
|
@ -336,7 +336,7 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<typename Result, typename ContIterator, typename... Args>
|
||||
|
@ -344,7 +344,7 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<typename Result, typename ContIterator, typename SepIterator, typename InputIterator, typename... Args>
|
||||
|
@ -366,10 +366,10 @@ namespace sprout {
|
|||
sprout::container_traits<Result>::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<Result>::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
|
||||
)
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename T, typename Compare>
|
||||
inline SPROUT_CONSTEXPR ForwardIterator
|
||||
upper_bound(
|
||||
ForwardIterator first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
ForwardIterator const& first, typename std::iterator_traits<ForwardIterator>::difference_type len,
|
||||
T const& value, Compare comp
|
||||
)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename InputIterator>
|
||||
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<InputIterator>::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<typename BidirectionalIterator>
|
||||
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<BidirectionalIterator>::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<typename InputIterator>
|
||||
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<InputIterator>::value_type value_type;
|
||||
return first == last ? count == 0
|
||||
: *first == SPROUT_CHAR_LITERAL('[', value_type)
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
|
||||
template<typename IntType, typename NullTerminatedIterator>
|
||||
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<NullTerminatedIterator>::value_type value_type;
|
||||
SPROUT_STATIC_ASSERT(sprout::detail::is_char_type_of_consecutive_digits<value_type>::value);
|
||||
return !sprout::ascii::isdigit(*str)
|
||||
|
@ -44,7 +44,7 @@ namespace sprout {
|
|||
sprout::is_unsigned<IntType>::value,
|
||||
IntType
|
||||
>::type
|
||||
ascii_to_int(NullTerminatedIterator str) {
|
||||
ascii_to_int(NullTerminatedIterator const& str) {
|
||||
typedef typename std::iterator_traits<NullTerminatedIterator>::value_type value_type;
|
||||
return sprout::ascii::isspace(*str)
|
||||
? sprout::detail::ascii_to_int<IntType>(sprout::next(str))
|
||||
|
@ -58,7 +58,7 @@ namespace sprout {
|
|||
sprout::is_signed<IntType>::value,
|
||||
IntType
|
||||
>::type
|
||||
ascii_to_int(NullTerminatedIterator str) {
|
||||
ascii_to_int(NullTerminatedIterator const& str) {
|
||||
typedef typename std::iterator_traits<NullTerminatedIterator>::value_type value_type;
|
||||
return sprout::ascii::isspace(*str)
|
||||
? sprout::detail::ascii_to_int<IntType>(sprout::next(str))
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
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<typename FloatType, typename NullTerminatedIterator>
|
||||
inline SPROUT_CONSTEXPR FloatType
|
||||
str_to_float(NullTerminatedIterator str) {
|
||||
str_to_float(NullTerminatedIterator const& str) {
|
||||
typedef typename std::iterator_traits<NullTerminatedIterator>::value_type char_type;
|
||||
return sprout::ascii::isspace(*str)
|
||||
? sprout::detail::str_to_float<FloatType>(sprout::next(str))
|
||||
|
@ -245,7 +245,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename FloatType, typename NullTerminatedIterator, typename CharPtr>
|
||||
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<FloatType>(str)
|
||||
#if defined(__MINGW32__)
|
||||
: std::is_same<typename std::remove_cv<FloatType>::type, float>::value ? ::strtof(&*str, endptr)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
|
||||
template<typename IntType, typename NullTerminatedIterator>
|
||||
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<IntType>(-1) ? (negative ? -1 * val : val)
|
||||
: val > (sprout::numeric_limits<IntType>::max() - x - (negative ? 1 : 0)) / base
|
||||
? (negative ? sprout::numeric_limits<IntType>::min() : sprout::numeric_limits<IntType>::max())
|
||||
|
@ -44,7 +44,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename IntType, typename NullTerminatedIterator>
|
||||
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<NullTerminatedIterator>::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<IntType>::value,
|
||||
IntType
|
||||
>::type
|
||||
str_to_int(NullTerminatedIterator str, int base) {
|
||||
str_to_int(NullTerminatedIterator const& str, int base) {
|
||||
typedef typename std::iterator_traits<NullTerminatedIterator>::value_type char_type;
|
||||
return sprout::ascii::isspace(*str)
|
||||
? sprout::detail::str_to_int<IntType>(sprout::next(str), base)
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
sprout::is_signed<IntType>::value,
|
||||
IntType
|
||||
>::type
|
||||
str_to_int(NullTerminatedIterator str, int base) {
|
||||
str_to_int(NullTerminatedIterator const& str, int base) {
|
||||
typedef typename std::iterator_traits<NullTerminatedIterator>::value_type char_type;
|
||||
return sprout::ascii::isspace(*str)
|
||||
? sprout::detail::str_to_int<IntType>(sprout::next(str), base)
|
||||
|
@ -104,7 +104,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename IntType, typename NullTerminatedIterator, typename CharPtr>
|
||||
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<IntType>(str, base)
|
||||
#if defined(_MSC_VER)
|
||||
: sprout::is_signed<IntType>::value
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
>::type
|
||||
count_n(
|
||||
RandomAccessIterator first, typename std::iterator_traits<RandomAccessIterator>::difference_type n, T const& value,
|
||||
RandomAccessIterator const& first, typename std::iterator_traits<RandomAccessIterator>::difference_type n, T const& value,
|
||||
std::random_access_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count_n(
|
||||
InputIterator first, typename std::iterator_traits<InputIterator>::difference_type n, T const& value,
|
||||
InputIterator const& first, typename std::iterator_traits<InputIterator>::difference_type n, T const& value,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count_n(InputIterator first, typename std::iterator_traits<InputIterator>::difference_type n, T const& value) {
|
||||
count_n(InputIterator const& first, typename std::iterator_traits<InputIterator>::difference_type n, T const& value) {
|
||||
typedef typename std::iterator_traits<InputIterator>::iterator_category* category;
|
||||
return sprout::detail::count_n(first, n, value, category());
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
>::type
|
||||
count_n_if(
|
||||
RandomAccessIterator first, typename std::iterator_traits<RandomAccessIterator>::difference_type n, Predicate pred,
|
||||
RandomAccessIterator const& first, typename std::iterator_traits<RandomAccessIterator>::difference_type n, Predicate pred,
|
||||
std::random_access_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count_n_if(
|
||||
InputIterator first, typename std::iterator_traits<InputIterator>::difference_type n, Predicate pred,
|
||||
InputIterator const& first, typename std::iterator_traits<InputIterator>::difference_type n, Predicate pred,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ namespace sprout {
|
|||
//
|
||||
template<typename InputIterator, typename Predicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
|
||||
count_n_if(InputIterator first, typename std::iterator_traits<InputIterator>::difference_type n, Predicate pred) {
|
||||
count_n_if(InputIterator const& first, typename std::iterator_traits<InputIterator>::difference_type n, Predicate pred) {
|
||||
typedef typename std::iterator_traits<InputIterator>::iterator_category* category;
|
||||
return sprout::detail::count_n_if(first, n, pred, category());
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::difference_type
|
||||
overlap_count_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate pred,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, BinaryPredicate pred,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot
|
||||
)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<RandomAccessIterator>::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<InputIterator, typename std::iterator_traits<InputIterator>::value_type, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
overlap_count_impl_1(
|
||||
sprout::tuples::tuple<InputIterator, typename std::iterator_traits<InputIterator>::value_type, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, BinaryPredicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::tuples::tuple<InputIterator, typename std::iterator_traits<InputIterator>::value_type, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
|
@ -80,7 +80,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<InputIterator, typename std::iterator_traits<InputIterator>::value_type, typename std::iterator_traits<InputIterator>::difference_type>
|
||||
overlap_count_impl(
|
||||
sprout::tuples::tuple<InputIterator, typename std::iterator_traits<InputIterator>::value_type, typename std::iterator_traits<InputIterator>::difference_type> const& current,
|
||||
InputIterator last, BinaryPredicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryPredicate pred, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return sprout::tuples::get<0>(current) == last ? current
|
||||
|
@ -96,7 +96,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::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<typename InputIterator, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::detail::overlap_count(first, last, pred, category());
|
||||
}
|
||||
|
||||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::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<typename std::iterator_traits<InputIterator>::value_type>()
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename InputIterator>
|
||||
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<typename InputIterator, typename T>
|
||||
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
|
||||
;
|
||||
|
|
|
@ -809,7 +809,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename Elem, typename RandomAccessIterator, std::size_t K, typename... Args>
|
||||
inline SPROUT_CONSTEXPR Elem
|
||||
get_param(RandomAccessIterator found, sprout::array<std::size_t, K> const& sizes, std::size_t idx, Args const&... args) {
|
||||
get_param(RandomAccessIterator const& found, sprout::array<std::size_t, K> const& sizes, std::size_t idx, Args const&... args) {
|
||||
return found == sizes.end() ? static_cast<Elem>('\0')
|
||||
: sprout::detail::param_seq_at<Elem>(
|
||||
found - sizes.begin(),
|
||||
|
|
|
@ -51,41 +51,41 @@ namespace sprout {
|
|||
typedef typename sprout::common_iterator_reference<LIterator, RIterator>::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<typename U, typename V, typename W>
|
||||
SPROUT_CONSTEXPR merge_iterator(merge_iterator<U, V, W> 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<typename LIterator, typename RIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::merge_iterator<LIterator, RIterator, Compare>
|
||||
make_merge_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) {
|
||||
return sprout::merge_iterator<LIterator, RIterator, Compare>(it1, lst_1, it2, lst_2, comp);
|
||||
make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2, Compare comp) {
|
||||
return sprout::merge_iterator<LIterator, RIterator, Compare>(it1, las1, it2, las2, comp);
|
||||
}
|
||||
template<typename LIterator, typename RIterator>
|
||||
inline SPROUT_CONSTEXPR sprout::merge_iterator<LIterator, RIterator>
|
||||
make_merge_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) {
|
||||
return sprout::merge_iterator<LIterator, RIterator>(it1, lst_1, it2, lst_2);
|
||||
make_merge_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) {
|
||||
return sprout::merge_iterator<LIterator, RIterator>(it1, las1, it2, las2);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -56,33 +56,33 @@ namespace sprout {
|
|||
typedef sprout::pair<iterator_type, iterator2_type> 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<typename U, typename V, typename W>
|
||||
SPROUT_CONSTEXPR set_difference_iterator(set_difference_iterator<U, V, W> 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<typename U, typename V, typename W>
|
||||
|
@ -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<typename LIterator, typename RIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::set_difference_iterator<LIterator, RIterator, Compare>
|
||||
make_set_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) {
|
||||
return sprout::set_difference_iterator<LIterator, RIterator, Compare>(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<LIterator, RIterator, Compare>(it1, las1, it2, las2, comp);
|
||||
}
|
||||
template<typename LIterator, typename RIterator>
|
||||
inline SPROUT_CONSTEXPR sprout::set_difference_iterator<LIterator, RIterator>
|
||||
make_set_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) {
|
||||
return sprout::set_difference_iterator<LIterator, RIterator>(it1, lst_1, it2, lst_2);
|
||||
make_set_difference_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) {
|
||||
return sprout::set_difference_iterator<LIterator, RIterator>(it1, las1, it2, las2);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -56,33 +56,33 @@ namespace sprout {
|
|||
typedef sprout::pair<iterator_type, iterator2_type> 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<typename U, typename V, typename W>
|
||||
SPROUT_CONSTEXPR set_intersection_iterator(set_intersection_iterator<U, V, W> 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<typename U, typename V, typename W>
|
||||
|
@ -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<typename LIterator, typename RIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::set_intersection_iterator<LIterator, RIterator, Compare>
|
||||
make_set_intersection_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) {
|
||||
return sprout::set_intersection_iterator<LIterator, RIterator, Compare>(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<LIterator, RIterator, Compare>(it1, las1, it2, las2, comp);
|
||||
}
|
||||
template<typename LIterator, typename RIterator>
|
||||
inline SPROUT_CONSTEXPR sprout::set_intersection_iterator<LIterator, RIterator>
|
||||
make_set_intersection_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) {
|
||||
return sprout::set_intersection_iterator<LIterator, RIterator>(it1, lst_1, it2, lst_2);
|
||||
make_set_intersection_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) {
|
||||
return sprout::set_intersection_iterator<LIterator, RIterator>(it1, las1, it2, las2);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -43,45 +43,45 @@ namespace sprout {
|
|||
typedef sprout::pair<iterator_type, iterator2_type> 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<typename U, typename V, typename W>
|
||||
SPROUT_CONSTEXPR set_symmetric_difference_iterator(set_symmetric_difference_iterator<U, V, W> 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<typename LIterator, typename RIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator<LIterator, RIterator, Compare>
|
||||
make_set_symmetric_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) {
|
||||
return sprout::set_symmetric_difference_iterator<LIterator, RIterator, Compare>(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<LIterator, RIterator, Compare>(it1, las1, it2, las2, comp);
|
||||
}
|
||||
template<typename LIterator, typename RIterator>
|
||||
inline SPROUT_CONSTEXPR sprout::set_symmetric_difference_iterator<LIterator, RIterator>
|
||||
make_set_symmetric_difference_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) {
|
||||
return sprout::set_symmetric_difference_iterator<LIterator, RIterator>(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<LIterator, RIterator>(it1, las1, it2, las2);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -55,48 +55,48 @@ namespace sprout {
|
|||
typedef sprout::pair<iterator_type, iterator2_type> 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<typename U, typename V, typename W>
|
||||
SPROUT_CONSTEXPR set_union_iterator(set_union_iterator<U, V, W> 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<typename LIterator, typename RIterator, typename Compare>
|
||||
inline SPROUT_CONSTEXPR sprout::set_union_iterator<LIterator, RIterator, Compare>
|
||||
make_set_union_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2, Compare comp) {
|
||||
return sprout::set_union_iterator<LIterator, RIterator, Compare>(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<LIterator, RIterator, Compare>(it1, las1, it2, las2, comp);
|
||||
}
|
||||
template<typename LIterator, typename RIterator>
|
||||
inline SPROUT_CONSTEXPR sprout::set_union_iterator<LIterator, RIterator>
|
||||
make_set_union_iterator(LIterator it1, LIterator lst_1, RIterator it2, RIterator lst_2) {
|
||||
return sprout::set_union_iterator<LIterator, RIterator>(it1, lst_1, it2, lst_2);
|
||||
make_set_union_iterator(LIterator it1, LIterator las1, RIterator it2, RIterator las2) {
|
||||
return sprout::set_union_iterator<LIterator, RIterator>(it1, las1, it2, las2);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename T, typename BinaryOperation>
|
||||
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<RandomAccessIterator>::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<InputIterator, T>
|
||||
accumulate_impl_1(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
typedef sprout::pair<InputIterator, T> type;
|
||||
|
@ -79,7 +79,7 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator, T>
|
||||
accumulate_impl(
|
||||
sprout::pair<InputIterator, T> const& current,
|
||||
InputIterator last, BinaryOperation binary_op, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
InputIterator const& last, BinaryOperation binary_op, typename std::iterator_traits<InputIterator>::difference_type n
|
||||
)
|
||||
{
|
||||
return current.first == last ? current
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename T, typename BinaryOperation>
|
||||
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*
|
||||
)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::value_type
|
||||
dft_element_gen_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type::value_type arg,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type pivot,
|
||||
typename std::iterator_traits<RandomAccessIterator>::difference_type k = 0
|
||||
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<RandomAccessIterator>::value_type
|
||||
dft_element_gen_impl(
|
||||
RandomAccessIterator first, RandomAccessIterator last,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last,
|
||||
typename std::iterator_traits<RandomAccessIterator>::value_type::value_type arg,
|
||||
std::random_access_iterator_tag*
|
||||
)
|
||||
|
@ -55,7 +55,7 @@ namespace sprout {
|
|||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_gen_impl_1(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type arg,
|
||||
typename std::iterator_traits<InputIterator>::difference_type k = 0,
|
||||
typename std::iterator_traits<InputIterator>::value_type value
|
||||
|
@ -80,7 +80,7 @@ namespace sprout {
|
|||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_gen_impl(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type arg,
|
||||
std::input_iterator_tag*
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ namespace sprout {
|
|||
template<typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_gen(
|
||||
InputIterator first, InputIterator last,
|
||||
InputIterator const& first, InputIterator const& last,
|
||||
typename std::iterator_traits<InputIterator>::value_type::value_type arg
|
||||
)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Size>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
dft_element_impl(
|
||||
InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
InputIterator const& first, InputIterator const& last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
Size size
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
amplitude_spectrum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
dft_impl(
|
||||
ForwardIterator first, ForwardIterator last, Result const& result,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
idft_impl(
|
||||
ForwardIterator first, ForwardIterator last, Result const& result,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
phase_spectrum_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
amplitude_spectrum_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::amplitude_spectrum(first, last, result, category());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_amplitude_spectrum_iterator(first),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
dft_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -47,7 +47,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
dft_impl(
|
||||
ForwardIterator first, ForwardIterator last, Result const& result,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
ForwardIterator first_, typename sprout::container_traits<Result>::difference_type i,
|
||||
ForwardIterator const& first_, typename sprout::container_traits<Result>::difference_type i,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<ForwardIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::dft(first, last, result, category());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
dft(ForwardIterator first, ForwardIterator last, Result const& result) {
|
||||
dft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) {
|
||||
return sprout::remake<Result>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_dft_iterator(first, last),
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
idft_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator last, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const& last, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -47,7 +47,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::type
|
||||
>::type
|
||||
idft_impl(
|
||||
ForwardIterator first, ForwardIterator last, Result const& result,
|
||||
ForwardIterator const& first, ForwardIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
ForwardIterator first_, typename sprout::container_traits<Result>::difference_type i,
|
||||
ForwardIterator const& first_, typename sprout::container_traits<Result>::difference_type i,
|
||||
Args const&... args
|
||||
)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
template<typename ForwardIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<ForwardIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::idft(first, last, result, category());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::type
|
||||
>::type
|
||||
idft(ForwardIterator first, ForwardIterator last, Result const& result) {
|
||||
idft(ForwardIterator const& first, ForwardIterator const& last, Result const& result) {
|
||||
return sprout::remake<Result>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_idft_iterator(first, last),
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
phase_spectrum_impl_ra(
|
||||
RandomAccessIterator first, RandomAccessIterator, Result const& result,
|
||||
RandomAccessIterator const& first, RandomAccessIterator const&, Result const& result,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
typename sprout::container_traits<Result>::difference_type offset,
|
||||
typename sprout::container_traits<Result>::size_type size,
|
||||
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
template<typename RandomAccessIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::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<Result>::size_type size,
|
||||
Args const&... args
|
||||
)
|
||||
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::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<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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<InputIterator>::iterator_category* category;
|
||||
return sprout::fixed::detail::phase_spectrum(first, last, result, category());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ namespace sprout {
|
|||
!sprout::is_fixed_container<Result>::value,
|
||||
typename sprout::fixed::results::algorithm<Result>::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>(
|
||||
result, sprout::size(result),
|
||||
sprout::make_phase_spectrum_iterator(first),
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Size>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::value_type
|
||||
idft_element_impl(
|
||||
InputIterator first, InputIterator last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
InputIterator const& first, InputIterator const& last, typename std::iterator_traits<InputIterator>::difference_type i,
|
||||
Size size
|
||||
)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::type
|
||||
adjacent_difference_impl(
|
||||
InputIterator first, InputIterator last, Result const& result,
|
||||
InputIterator const& first, InputIterator const& last, Result const& result,
|
||||
typename sprout::container_traits<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
template<typename InputIterator, typename Result, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::results::algorithm<Result>::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<Result>::difference_type offset
|
||||
)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue