24#ifndef MYSQL_SETS_NESTED_SET_BINARY_OPERATION_ITERATOR_BASE_H
25#define MYSQL_SETS_NESTED_SET_BINARY_OPERATION_ITERATOR_BASE_H
50template <
class Self_tp, Is_nested_set Source1_tp, Is_nested_set Source2_tp,
52 requires Is_compatible_set<Source1_tp, Source2_tp>
65 using Key_t =
typename Key_traits_t::Element_t;
69 using Value_t = std::pair<const Key_t, Mapped_t>;
CRTP base class (mixin) that makes your class a standard-compliant iterator, given only a minimal set...
Definition: iterator_interface.h:370
Common base class for the forward iterators over union view, intersection view, and subtraction view ...
Definition: nested_set_binary_operation_iterator_base.h:54
auto & iterator2()
Return reference to the current iterator into the second set.
Definition: nested_set_binary_operation_iterator_base.h:109
Source2_tp Source2_t
Definition: nested_set_binary_operation_iterator_base.h:57
Nested_set_binary_operation_iterator_base & operator=(Nested_set_binary_operation_iterator_base &&other) noexcept=default
static constexpr auto operation
Definition: nested_set_binary_operation_iterator_base.h:60
typename Source2_t::Const_iterator_t Iterator2_t
Definition: nested_set_binary_operation_iterator_base.h:63
Nested_set_binary_operation_iterator_base(const Source1_t *source1, const Source2_t *source2, const Iterator1_t &iterator1, const Iterator2_t &iterator2)
Definition: nested_set_binary_operation_iterator_base.h:77
Binary_operation_view_type< operation, Mapped1_t, Mapped2_t > Mapped_t
Definition: nested_set_binary_operation_iterator_base.h:68
typename Source1_tp::Key_traits_t Key_traits_t
Definition: nested_set_binary_operation_iterator_base.h:64
~Nested_set_binary_operation_iterator_base() noexcept=default
Value_t make_value2() const
Return the current value, computed as operation(nullptr, m_iterator2).
Definition: nested_set_binary_operation_iterator_base.h:124
Source2_t::Mapped_t Mapped2_t
Definition: nested_set_binary_operation_iterator_base.h:67
std::pair< const Key_t, Mapped_t > Value_t
Definition: nested_set_binary_operation_iterator_base.h:69
Value_t make_value1() const
Return the current value, computed as operation(m_iterator1, nullptr).
Definition: nested_set_binary_operation_iterator_base.h:119
Nested_set_binary_operation_iterator_base(const Nested_set_binary_operation_iterator_base &other) noexcept=default
Iterator1_t m_iterator1
Iterator into the first source.
Definition: nested_set_binary_operation_iterator_base.h:137
Source1_tp Source1_t
Definition: nested_set_binary_operation_iterator_base.h:56
Nested_set_binary_operation_iterator_base()=default
Iterator2_t m_iterator2
Iterator into the second source.
Definition: nested_set_binary_operation_iterator_base.h:142
Nested_set_binary_operation_iterator_base(Nested_set_binary_operation_iterator_base &&other) noexcept=default
typename Key_traits_t::Element_t Key_t
Definition: nested_set_binary_operation_iterator_base.h:65
Opt_source1_t m_source1
The first source.
Definition: nested_set_binary_operation_iterator_base.h:129
const auto & iterator2() const
Return const reference to the current iterator into the second set.
Definition: nested_set_binary_operation_iterator_base.h:106
Opt_source2_t m_source2
The second source.
Definition: nested_set_binary_operation_iterator_base.h:132
typename Source1_t::Const_iterator_t Iterator1_t
Definition: nested_set_binary_operation_iterator_base.h:62
auto & iterator1()
Return reference to the current iterator into the first set.
Definition: nested_set_binary_operation_iterator_base.h:103
Value_t make_value() const
Return the current value, computed as operation(m_iterator1, m_iterator2).
Definition: nested_set_binary_operation_iterator_base.h:113
Nested_set_binary_operation_iterator_base & operator=(const Nested_set_binary_operation_iterator_base &other) noexcept=default
const auto & iterator1() const
Return const reference to the current iterator into the first set.
Definition: nested_set_binary_operation_iterator_base.h:100
Source1_t::Mapped_t Mapped1_t
Definition: nested_set_binary_operation_iterator_base.h:66
Binary_operation
Identifies the type of a binary operation.
Definition: binary_operation.h:37
std::conditional_t<(int) binary_operation==(int) Binary_operation::op_union, Union_view< Source1_t, Source2_t >, std::conditional_t<(int) binary_operation==(int) Binary_operation::op_intersection, Intersection_view< Source1_t, Source2_t >, std::conditional_t<(int) binary_operation==(int) Binary_operation::op_subtraction, Subtraction_view< Source1_t, Source2_t >, void > > > Binary_operation_view_type
For a Binary_operation and two operand sets, gives the corresponding Union_view, Intersection_view,...
Definition: base_binary_operation_views.h:91
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76