24#ifndef MYSQL_SETS_BASE_BINARY_OPERATION_VIEWS_H
25#define MYSQL_SETS_BASE_BINARY_OPERATION_VIEWS_H
53template <
class Source1_tp,
class Source2_tp>
60template <
class Source1_tp,
class Source2_tp>
67template <
class Source1_tp,
class Source2_tp>
81template <Binary_operation binary_operation,
class Source1_t,
class Source2_t>
88 std::conditional_t<(int)binary_operation ==
107template <Binary_operation binary_operation,
class Source1_t,
class Source2_t>
109 const Source2_t &source2) {
110 static_assert(!std::is_pointer_v<Source1_t> && !std::is_pointer_v<Source2_t>);
124template <
class Source1_t,
class Source2_t>
126 const Source2_t &source2) {
127 return make_binary_operation_view<Binary_operation::op_union>(source1,
140template <
class Source1_t,
class Source2_t>
142 const Source2_t &source2) {
143 return make_binary_operation_view<Binary_operation::op_intersection>(source1,
156template <
class Source1_t,
class Source2_t>
158 const Source2_t &source2) {
159 return make_binary_operation_view<Binary_operation::op_subtraction>(source1,
169template <
class Source1_t,
class Source2_t>
171 std::ranges::enable_view<mysql::sets::Union_view<Source1_t, Source2_t>> =
175template <
class Source1_t,
class Source2_t>
176constexpr bool std::ranges::enable_view<
180template <
class Source1_t,
class Source2_t>
181constexpr bool std::ranges::enable_view<
Primary template for views over intersections of two sets operations.
Definition: base_binary_operation_views.h:61
Primary template for views over subtractions of two sets operations.
Definition: base_binary_operation_views.h:68
Primary template for views over unions of two sets operations.
Definition: base_binary_operation_views.h:54
Definition: gtid_set.h:183
auto make_union_view(const Source1_t &source1, const Source2_t &source2)
Return the Union_view over the arguments.
Definition: base_binary_operation_views.h:125
auto make_binary_operation_view(const Source1_t &source1, const Source2_t &source2)
Return the Union_view, Intersection_view, or Subtraction_view over the arguments, according to the gi...
Definition: base_binary_operation_views.h:108
auto make_subtraction_view(const Source1_t &source1, const Source2_t &source2)
Return the Subtraction_view over the arguments.
Definition: base_binary_operation_views.h:157
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
auto make_intersection_view(const Source1_t &source1, const Source2_t &source2)
Return the Intersection_view over the arguments.
Definition: base_binary_operation_views.h:141