@@ -74,7 +74,7 @@ struct set_union_adaptor
74
74
public:
75
75
using value_type = std::common_type_t <value_t <Base1>, value_t <Base2>>;
76
76
77
- inline static constexpr bool is_infinite = flux::infinite_sequence<Base1> ||
77
+ inline static constexpr bool is_infinite = flux::infinite_sequence<Base1> ||
78
78
flux::infinite_sequence<Base2>;
79
79
80
80
template <typename Self>
@@ -91,7 +91,7 @@ struct set_union_adaptor
91
91
requires maybe_const_iterable<Self>
92
92
static constexpr auto is_last (Self& self, cursor_type const & cur) -> bool
93
93
{
94
- return flux::is_last (self.base1_ , cur.base1_cursor ) &&
94
+ return flux::is_last (self.base1_ , cur.base1_cursor ) &&
95
95
flux::is_last (self.base2_ , cur.base2_cursor );
96
96
}
97
97
@@ -111,7 +111,7 @@ struct set_union_adaptor
111
111
template <typename Self>
112
112
requires maybe_const_iterable<Self>
113
113
static constexpr auto read_at (Self& self, cursor_type const & cur)
114
- -> std::common_reference_t<decltype(flux::read_at(self.base1_, cur.base1_cursor)),
114
+ -> std::common_reference_t<decltype(flux::read_at(self.base1_, cur.base1_cursor)),
115
115
decltype(flux::read_at(self.base2_, cur.base2_cursor))>
116
116
{
117
117
if (cur.active_ == cursor_type::first) {
@@ -122,7 +122,7 @@ struct set_union_adaptor
122
122
}
123
123
124
124
template <typename Self>
125
- requires maybe_const_iterable<Self> &&
125
+ requires maybe_const_iterable<Self> &&
126
126
bounded_sequence<Base1> && bounded_sequence<Base2>
127
127
static constexpr auto last (Self& self) -> cursor_type
128
128
{
@@ -132,7 +132,7 @@ struct set_union_adaptor
132
132
template <typename Self>
133
133
requires maybe_const_iterable<Self>
134
134
static constexpr auto move_at (Self& self, cursor_type const & cur)
135
- -> std::common_reference_t<decltype(flux::move_at(self.base1_, cur.base1_cursor)),
135
+ -> std::common_reference_t<decltype(flux::move_at(self.base1_, cur.base1_cursor)),
136
136
decltype(flux::move_at(self.base2_, cur.base2_cursor))>
137
137
{
138
138
if (cur.active_ == cursor_type::first) {
@@ -141,7 +141,7 @@ struct set_union_adaptor
141
141
return flux::move_at (self.base2_ , cur.base2_cursor );
142
142
}
143
143
}
144
-
144
+
145
145
};
146
146
};
147
147
@@ -244,7 +244,7 @@ struct set_difference_adaptor
244
244
{
245
245
return flux::move_at (self.base1_ , cur.base1_cursor );
246
246
}
247
-
247
+
248
248
};
249
249
};
250
250
@@ -272,10 +272,13 @@ struct set_symmetric_difference_adaptor
272
272
cursor_t <Base2> base2_cursor;
273
273
enum : char {first, second, first_done, second_done} state_ = first;
274
274
275
- friend auto operator ==(cursor_type const &, cursor_type const &) -> bool
275
+ friend constexpr auto operator ==(cursor_type const & lhs , cursor_type const & rhs ) -> bool
276
276
requires std::equality_comparable<cursor_t <Base1>> &&
277
277
std::equality_comparable<cursor_t <Base2>>
278
- = default ;
278
+ {
279
+ return lhs.base1_cursor == rhs.base1_cursor &&
280
+ lhs.base2_cursor == rhs.base2_cursor ;
281
+ }
279
282
};
280
283
281
284
template <typename Self>
@@ -311,7 +314,7 @@ struct set_symmetric_difference_adaptor
311
314
public:
312
315
using value_type = std::common_type_t <value_t <Base1>, value_t <Base2>>;
313
316
314
- inline static constexpr bool is_infinite = flux::infinite_sequence<Base1> ||
317
+ inline static constexpr bool is_infinite = flux::infinite_sequence<Base1> ||
315
318
flux::infinite_sequence<Base2>;
316
319
317
320
template <typename Self>
@@ -328,7 +331,7 @@ struct set_symmetric_difference_adaptor
328
331
requires maybe_const_iterable<Self>
329
332
static constexpr auto is_last (Self& self, cursor_type const & cur) -> bool
330
333
{
331
- return flux::is_last (self.base1_ , cur.base1_cursor ) &&
334
+ return flux::is_last (self.base1_ , cur.base1_cursor ) &&
332
335
flux::is_last (self.base2_ , cur.base2_cursor );
333
336
}
334
337
@@ -370,7 +373,9 @@ struct set_symmetric_difference_adaptor
370
373
}
371
374
372
375
template <typename Self>
373
- requires maybe_const_iterable<Self> && bounded_sequence<Base1>
376
+ requires maybe_const_iterable<Self> &&
377
+ bounded_sequence<Base1> &&
378
+ bounded_sequence<Base2>
374
379
static constexpr auto last (Self& self) -> cursor_type
375
380
{
376
381
return cursor_type{flux::last (self.base1_ ), flux::last (self.base2_ )};
@@ -428,7 +433,7 @@ struct set_intersection_adaptor
428
433
429
434
template <typename Self>
430
435
static constexpr void update (Self& self, cursor_type& cur) {
431
- while (not flux::is_last (self.base1_ , cur.base1_cursor ) &&
436
+ while (not flux::is_last (self.base1_ , cur.base1_cursor ) &&
432
437
not flux::is_last (self.base2_ , cur.base2_cursor ))
433
438
{
434
439
auto r = std::invoke (self.cmp_ , flux::read_at (self.base1_ , cur.base1_cursor ),
@@ -463,7 +468,7 @@ struct set_intersection_adaptor
463
468
requires maybe_const_iterable<Self>
464
469
static constexpr auto is_last (Self& self, cursor_type const & cur) -> bool
465
470
{
466
- return flux::is_last (self.base1_ , cur.base1_cursor ) ||
471
+ return flux::is_last (self.base1_ , cur.base1_cursor ) ||
467
472
flux::is_last (self.base2_ , cur.base2_cursor );
468
473
}
469
474
@@ -491,7 +496,7 @@ struct set_intersection_adaptor
491
496
{
492
497
return flux::move_at (self.base1_ , cur.base1_cursor );
493
498
}
494
-
499
+
495
500
};
496
501
};
497
502
@@ -503,7 +508,7 @@ concept set_op_compatible =
503
508
504
509
struct set_union_fn {
505
510
template <adaptable_sequence Seq1, adaptable_sequence Seq2, typename Cmp = std::compare_three_way>
506
- requires set_op_compatible<Seq1, Seq2> &&
511
+ requires set_op_compatible<Seq1, Seq2> &&
507
512
weak_ordering_for<Cmp, Seq1> &&
508
513
weak_ordering_for<Cmp, Seq2>
509
514
[[nodiscard]]
0 commit comments