24#ifndef MYSQL_SETS_BOUNDARY_SET_BINARY_OPERATION_VIEW_BASE_H
25#define MYSQL_SETS_BOUNDARY_SET_BINARY_OPERATION_VIEW_BASE_H
52template <Is_boundary_set Source1_tp, Is_boundary_set Source2_tp,
54 requires Is_compatible_set<Source1_tp, Source2_tp>
57 Source1_tp, Source2_tp, operation_tp>,
58 Boundary_set_binary_operation_iterator<
59 Source1_tp, Source2_tp, operation_tp>,
60 Boundary_set_binary_operation_iterator<
61 Source1_tp, Source2_tp, operation_tp>,
62 typename Source1_tp::Set_traits_t> {
112 [[nodiscard]]
auto end()
const {
121 template <
class Iter_t>
126 self.m_source1.lower_bound(hint.position1(), element),
127 self.m_source2.lower_bound(hint.position2(), element));
134 template <
class Iter_t>
139 self.m_source1.upper_bound(hint.position1(), element),
140 self.m_source2.upper_bound(hint.position2(), element));
auto begin() const
Return a valid begin iterator, even if !has_object().
Definition: view_sources.h:262
const Source_t * pointer() const
Return a pointer to the source if there is one, or nullptr otherwise.
Definition: view_sources.h:242
auto end() const
Return a valid end iterator, even if !has_object().
Definition: view_sources.h:273
CRTP base class/mixin, used to implement Boundary Sets that are views.
Definition: boundary_set_interface.h:106
Forward iterator over the result of a binary set operation (union, intersection, or subtraction) over...
Definition: boundary_set_binary_operation_iterator.h:50
Common base class for the specializations of Union_view, Intersection_view, and Subtraction_view for ...
Definition: boundary_set_binary_operation_view_base.h:62
mysql::ranges::Range_const_iterator_type< Source1_t > Iterator1_t
Definition: boundary_set_binary_operation_view_base.h:71
static constexpr Iter_t lower_bound_impl(mysql::meta::Is_same_ignore_const< This_t > auto &self, const Iter_t &hint, const Element_t &element)
For internal use by the CTRP base class only.
Definition: boundary_set_binary_operation_view_base.h:122
static constexpr auto operation
Definition: boundary_set_binary_operation_view_base.h:68
Source1_tp Source1_t
Definition: boundary_set_binary_operation_view_base.h:64
Boundary_set_binary_operation_iterator< Source1_t, Source2_t, operation > Iterator_t
Definition: boundary_set_binary_operation_view_base.h:76
const Source1_t * source1() const
Return pointer to the first boundary set operand.
Definition: boundary_set_binary_operation_view_base.h:144
static constexpr Iter_t upper_bound_impl(mysql::meta::Is_same_ignore_const< This_t > auto &self, const Iter_t &hint, const Element_t &element)
For internal use by the CTRP base class only.
Definition: boundary_set_binary_operation_view_base.h:135
Set_traits_t::Element_t Element_t
Definition: boundary_set_binary_operation_view_base.h:74
typename Source1_t::Set_traits_t Set_traits_t
Definition: boundary_set_binary_operation_view_base.h:73
Opt_source2_t m_source2
Pointer to the second boundary set operand.
Definition: boundary_set_binary_operation_view_base.h:154
mysql::ranges::Range_const_iterator_type< Source2_t > Iterator2_t
Definition: boundary_set_binary_operation_view_base.h:72
auto end() const
Definition: boundary_set_binary_operation_view_base.h:112
auto begin() const
Definition: boundary_set_binary_operation_view_base.h:106
Source2_tp Source2_t
Definition: boundary_set_binary_operation_view_base.h:65
static constexpr bool disable_fast_size
Definition: boundary_set_binary_operation_view_base.h:77
Boundary_set_binary_operation_view_base(const Source1_t *source1, const Source2_t *source2) noexcept
Construct a new view over the given boundary set sources.
Definition: boundary_set_binary_operation_view_base.h:99
const Source2_t * source2() const
Return pointer to the second boundary set operand.
Definition: boundary_set_binary_operation_view_base.h:147
Boundary_set_binary_operation_view_base() noexcept=default
Construct a new, empty view.
Opt_source1_t m_source1
Pointer to the first boundary set operand.
Definition: boundary_set_binary_operation_view_base.h:151
std::remove_cvref_t< decltype(std::declval< const Range_t >().begin())> Range_const_iterator_type
Gives the const_iterator type, deduced from the begin() const member.
Definition: meta.h:47
Binary_operation
Identifies the type of a binary operation.
Definition: binary_operation.h:37
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76