24#ifndef MYSQL_SETS_NESTED_SET_BINARY_OPERATION_VIEW_INTERFACE_H
25#define MYSQL_SETS_NESTED_SET_BINARY_OPERATION_VIEW_INTERFACE_H
60template <Is_nested_set Source1_t, Is_nested_set Source2_t,
65 std::conditional_t<(int)operation_t ==
82 Nested_binary_operation_iterator_type<
83 Source1_tp, Source2_tp, operation_tp>,
84 Nested_binary_operation_iterator_type<
85 Source1_tp, Source2_tp, operation_tp>,
86 typename Source1_tp::Set_traits_t> {
102 using Key_t =
typename Key_traits_t::Element_t;
147 assert(it !=
self().end());
153 assert(it !=
self().end());
172 [[nodiscard]]
const auto &
self()
const {
173 return static_cast<const Self_t &
>(*this);
175 [[nodiscard]]
auto &
self() {
return static_cast<Self_t &
>(*this); }
Self_tp Self_t
Definition: collection_interface.h:91
const Source_t * pointer() const
Return a pointer to the source if there is one, or nullptr otherwise.
Definition: view_sources.h:242
CRTP base class/mixin used to implement Nested sets that are views.
Definition: nested_set_interface.h:131
Common base class for all the view classes.
Definition: nested_set_binary_operation_view_interface.h:86
mysql::ranges::Range_const_iterator_type< Source1_t > Iterator1_t
Definition: nested_set_binary_operation_view_interface.h:95
typename Set_traits_t::Mapped_traits_t Mapped_traits_t
Definition: nested_set_binary_operation_view_interface.h:100
Source2_tp Source2_t
Definition: nested_set_binary_operation_view_interface.h:91
typename Iterator_t::Value_t Value_t
Definition: nested_set_binary_operation_view_interface.h:106
Nested_binary_operation_iterator_type< Source1_t, Source2_t, operation > Iterator_t
Definition: nested_set_binary_operation_view_interface.h:104
typename Set_traits_t::Mapped_category_t Mapped_category_t
Definition: nested_set_binary_operation_view_interface.h:101
Nested_set_binary_operation_view_interface(Nested_set_binary_operation_view_interface &&) noexcept=default
typename Key_traits_t::Element_t Key_t
Definition: nested_set_binary_operation_view_interface.h:102
typename Source1_t::Set_traits_t Set_traits_t
Definition: nested_set_binary_operation_view_interface.h:97
Nested_set_binary_operation_view_interface()=default
Nested_set_binary_operation_view_interface(const Source1_t &source1, const Source2_t &source2) noexcept
Construct a new Nested_set_binary_operation_view_interface over the given sources.
Definition: nested_set_binary_operation_view_interface.h:117
Source1_tp Source1_t
Definition: nested_set_binary_operation_view_interface.h:90
typename Iterator_t::Mapped_t Mapped_t
Definition: nested_set_binary_operation_view_interface.h:105
Opt_source2_t m_source2
Pointer to the second nested set operand.
Definition: nested_set_binary_operation_view_interface.h:169
auto operator[](const Key_t &key) noexcept
Definition: nested_set_binary_operation_view_interface.h:151
Opt_source1_t m_source1
Pointer to the first nested set operand.
Definition: nested_set_binary_operation_view_interface.h:166
Nested_set_binary_operation_view_interface(const Source1_t *source1, const Source2_t *source2) noexcept
Construct a new Nested_set_binary_operation_view_interface over the given sources.
Definition: nested_set_binary_operation_view_interface.h:130
mysql::ranges::Range_const_iterator_type< Source2_t > Iterator2_t
Definition: nested_set_binary_operation_view_interface.h:96
static constexpr auto operation
Definition: nested_set_binary_operation_view_interface.h:94
typename Set_traits_t::Key_traits_t Key_traits_t
Definition: nested_set_binary_operation_view_interface.h:99
Iterator_t make_iterator(const Iterator1_t &iterator1, const Iterator2_t &iterator2) const
Definition: nested_set_binary_operation_view_interface.h:159
Nested_set_binary_operation_view_interface(const Nested_set_binary_operation_view_interface &) noexcept=default
static constexpr bool disable_fast_size
Definition: nested_set_binary_operation_view_interface.h:107
Iterator over the intersection of two sets.
Definition: nested_set_intersection_iterator.h:50
Iterator over the difference of two sets.
Definition: nested_set_subtraction_iterator.h:50
Iterator over the union of two sets.
Definition: nested_set_union_iterator.h:51
True if Set1_t and Set2_t have the same Set_category_t and Set_traits_t.
Definition: set_categories_and_traits.h:77
True if Test is a nested set.
Definition: nested_set_meta.h:110
Container::const_iterator find(const Container &c, Value &&value)
Definition: generic.h:39
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
std::conditional_t<(int) operation_t==(int) Binary_operation::op_union, Nested_set_union_iterator< Source1_t, Source2_t >, std::conditional_t<(int) operation_t==(int) Binary_operation::op_intersection, Nested_set_intersection_iterator< Source1_t, Source2_t >, Nested_set_subtraction_iterator< Source1_t, Source2_t > > > Nested_binary_operation_iterator_type
Type alias that provides the iterator type for a given Binary_operation.
Definition: nested_set_binary_operation_view_interface.h:68
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
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Tag to identify a class as a Nested set.
Definition: nested_set_category.h:41