mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add range adaptor: merged, set operations
This commit is contained in:
parent
3472e8b94e
commit
9aa2a7c9b2
43 changed files with 1176 additions and 62 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/next.hpp>
|
||||
#include <sprout/iterator/type_traits/common.hpp>
|
||||
#include <sprout/functional/less.hpp>
|
||||
#include <sprout/utility/swap.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace sprout {
|
|||
private:
|
||||
Predicate pred_;
|
||||
public:
|
||||
SPROUT_CONSTEXPR remove_if_filter(Predicate pred)
|
||||
explicit SPROUT_CONSTEXPR remove_if_filter(Predicate pred)
|
||||
: pred_(pred)
|
||||
{}
|
||||
template<typename U>
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace sprout {
|
|||
private:
|
||||
T value_;
|
||||
public:
|
||||
SPROUT_CONSTEXPR remove_filter(T const& value)
|
||||
explicit SPROUT_CONSTEXPR remove_filter(T const& value)
|
||||
: value_(value)
|
||||
{}
|
||||
template<typename U>
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
, comp(other.comp)
|
||||
{}
|
||||
public:
|
||||
set_difference_iterator()
|
||||
SPROUT_CONSTEXPR set_difference_iterator()
|
||||
: current(), lst1(), lst2(), comp()
|
||||
{}
|
||||
set_difference_iterator(set_difference_iterator const&) = default;
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
, comp(other.comp)
|
||||
{}
|
||||
public:
|
||||
set_intersection_iterator()
|
||||
SPROUT_CONSTEXPR set_intersection_iterator()
|
||||
: current(), lst1(), lst2(), comp()
|
||||
{}
|
||||
set_intersection_iterator(set_intersection_iterator const&) = default;
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
protected:
|
||||
bool in_left;
|
||||
protected:
|
||||
set_symmetric_difference_iterator_impl()
|
||||
SPROUT_CONSTEXPR set_symmetric_difference_iterator_impl()
|
||||
: current(), lst1(), lst2(), comp(), in_left(true)
|
||||
{}
|
||||
set_symmetric_difference_iterator_impl(set_symmetric_difference_iterator_impl const&) = default;
|
||||
|
@ -128,7 +128,7 @@ namespace sprout {
|
|||
: impl_type(next, other.lst1, other.lst2, other.comp)
|
||||
{}
|
||||
public:
|
||||
set_symmetric_difference_iterator()
|
||||
SPROUT_CONSTEXPR set_symmetric_difference_iterator()
|
||||
: impl_type()
|
||||
{}
|
||||
set_symmetric_difference_iterator(set_symmetric_difference_iterator const&) = default;
|
||||
|
|
|
@ -69,10 +69,10 @@ namespace sprout {
|
|||
: current(next)
|
||||
, lst1(other.lst1), lst2(other.lst2)
|
||||
, comp(other.comp)
|
||||
, in_left(check_in_left(next.first, lst1, next.second, lst2, comp))
|
||||
, in_left(check_in_left(next.first, other.lst1, next.second, other.lst2, other.comp))
|
||||
{}
|
||||
public:
|
||||
set_union_iterator()
|
||||
SPROUT_CONSTEXPR set_union_iterator()
|
||||
: current(), lst1(), lst2(), comp(), in_left(true)
|
||||
{}
|
||||
set_union_iterator(set_union_iterator const&) = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue