mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
fix transformed
This commit is contained in:
parent
18b479e3ac
commit
6b08a81d3e
2 changed files with 14 additions and 14 deletions
|
@ -61,7 +61,7 @@ namespace sprout {
|
|||
protected:
|
||||
iterator_type current;
|
||||
iterator2_type current2;
|
||||
functor_type func;
|
||||
BinaryFunction func;
|
||||
public:
|
||||
transform_iterator() = default;
|
||||
transform_iterator(transform_iterator const&) = default;
|
||||
|
@ -69,7 +69,7 @@ namespace sprout {
|
|||
: current(it)
|
||||
, current2(it2)
|
||||
{}
|
||||
SPROUT_CONSTEXPR transform_iterator(iterator_type it, iterator2_type it2, functor_type func)
|
||||
SPROUT_CONSTEXPR transform_iterator(iterator_type it, iterator2_type it2, BinaryFunction func)
|
||||
: current(it)
|
||||
, current2(it2)
|
||||
, func(func)
|
||||
|
@ -92,7 +92,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR iterator_type base2() const {
|
||||
return current2;
|
||||
}
|
||||
SPROUT_CONSTEXPR functor_type functor() const {
|
||||
SPROUT_CONSTEXPR BinaryFunction functor() const {
|
||||
return func;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator*() const {
|
||||
|
@ -196,14 +196,14 @@ namespace sprout {
|
|||
typedef value_type* pointer;
|
||||
protected:
|
||||
iterator_type current;
|
||||
functor_type func;
|
||||
UnaryFunction func;
|
||||
public:
|
||||
transform_iterator() = default;
|
||||
transform_iterator(transform_iterator const&) = default;
|
||||
explicit SPROUT_CONSTEXPR transform_iterator(iterator_type it)
|
||||
: current(it)
|
||||
{}
|
||||
SPROUT_CONSTEXPR transform_iterator(iterator_type it, functor_type func)
|
||||
SPROUT_CONSTEXPR transform_iterator(iterator_type it, UnaryFunction func)
|
||||
: current(it)
|
||||
, func(func)
|
||||
{}
|
||||
|
@ -221,7 +221,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR iterator_type base() const {
|
||||
return current;
|
||||
}
|
||||
SPROUT_CONSTEXPR functor_type functor() const {
|
||||
SPROUT_CONSTEXPR UnaryFunction functor() const {
|
||||
return func;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator*() const {
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace sprout {
|
|||
public:
|
||||
transformed_range() = default;
|
||||
transformed_range(transformed_range const&) = default;
|
||||
SPROUT_CONSTEXPR transformed_range(functor_type func, range1_type& range1, range2_type& range2)
|
||||
SPROUT_CONSTEXPR transformed_range(BinaryFunction func, range1_type& range1, range2_type& range2)
|
||||
: base_type(
|
||||
iterator(sprout::begin(range1), sprout::begin(range2), func),
|
||||
iterator(sprout::end(range1), sprout::end(range2), func)
|
||||
|
@ -78,7 +78,7 @@ namespace sprout {
|
|||
public:
|
||||
transformed_range() = default;
|
||||
transformed_range(transformed_range const&) = default;
|
||||
SPROUT_CONSTEXPR transformed_range(functor_type func, range1_type& range)
|
||||
SPROUT_CONSTEXPR transformed_range(UnaryFunction func, range1_type& range)
|
||||
: base_type(
|
||||
iterator(sprout::begin(range), func),
|
||||
iterator(sprout::end(range), func)
|
||||
|
@ -95,16 +95,16 @@ namespace sprout {
|
|||
typedef BinaryFunction functor_type;
|
||||
typedef RRange range2_type;
|
||||
private:
|
||||
functor_type func_;
|
||||
BinaryFunction func_;
|
||||
sprout::value_holder<range2_type&> range_;
|
||||
public:
|
||||
transform_holder() = default;
|
||||
transform_holder(transform_holder const&) = default;
|
||||
SPROUT_CONSTEXPR transform_holder(functor_type func, range2_type& range)
|
||||
SPROUT_CONSTEXPR transform_holder(BinaryFunction func, range2_type& range)
|
||||
: func_(func)
|
||||
, range_(range)
|
||||
{}
|
||||
SPROUT_CONSTEXPR functor_type functor() const {
|
||||
SPROUT_CONSTEXPR BinaryFunction functor() const {
|
||||
return func_;
|
||||
}
|
||||
SPROUT_CONSTEXPR range2_type& range() const {
|
||||
|
@ -116,14 +116,14 @@ namespace sprout {
|
|||
public:
|
||||
typedef UnaryFunction functor_type;
|
||||
private:
|
||||
functor_type func_;
|
||||
UnaryFunction func_;
|
||||
public:
|
||||
transform_holder() = default;
|
||||
transform_holder(transform_holder const&) = default;
|
||||
explicit SPROUT_CONSTEXPR transform_holder(functor_type func)
|
||||
explicit SPROUT_CONSTEXPR transform_holder(UnaryFunction func)
|
||||
: func_(func)
|
||||
{}
|
||||
SPROUT_CONSTEXPR functor_type functor() const {
|
||||
SPROUT_CONSTEXPR UnaryFunction functor() const {
|
||||
return func_;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue