mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix non-modifying algorithm: for InputIterator Requirements
This commit is contained in:
parent
3800b22a22
commit
4e4c1b1786
5 changed files with 9 additions and 5 deletions
|
@ -59,7 +59,9 @@ namespace sprout {
|
|||
{
|
||||
typedef sprout::pair<InputIterator, typename std::iterator_traits<InputIterator>::difference_type> type;
|
||||
return current.first == last ? current
|
||||
: n == 1 ? type(sprout::next(current.first), current.second + (*current.first == value ? 1 : 0))
|
||||
: n == 1 ? *current.first == value
|
||||
? type(sprout::next(current.first), current.second + 1)
|
||||
: type(sprout::next(current.first), current.second)
|
||||
: sprout::detail::count_impl_1(
|
||||
sprout::detail::count_impl_1(
|
||||
current,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue