mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add adaptor piped, taken, dropped, window, offset, adapted_xxx
This commit is contained in:
parent
5c9a8153de
commit
cc4ade67fd
47 changed files with 1349 additions and 76 deletions
|
@ -2,6 +2,7 @@
|
|||
#define SPROUT_ITERATOR_GENERATOR_ITERATOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
|
@ -36,15 +37,13 @@ namespace sprout {
|
|||
difference_type count_;
|
||||
public:
|
||||
SPROUT_CONSTEXPR generator_iterator()
|
||||
: gen_()
|
||||
, count_()
|
||||
: gen_(), count_()
|
||||
{}
|
||||
explicit SPROUT_CONSTEXPR generator_iterator(
|
||||
generator_type const& gen,
|
||||
difference_type count = -1
|
||||
difference_type count = std::numeric_limits<difference_type>::max()
|
||||
)
|
||||
: gen_(gen)
|
||||
, count_(count)
|
||||
: gen_(gen), count_(count)
|
||||
{}
|
||||
generator_type& generator() {
|
||||
return gen_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue