|
4422 | 4422 | template<bool Const>
|
4423 | 4423 | class take_view<V>::@\exposid{sentinel}@ {
|
4424 | 4424 | private:
|
4425 |
| - using @\exposid{Base}@ = @\exposid{maybe-const}@<Const, V>; // \expos |
4426 |
| - using @\exposid{CI}@ = counted_iterator<iterator_t<@\exposid{Base}@>>; // \expos |
4427 |
| - sentinel_t<@\exposid{Base}@> @\exposid{end_}@ = sentinel_t<@\exposid{Base}@>(); // \expos |
| 4425 | + using @\exposid{Base}@ = @\exposid{maybe-const}@<Const, V>; // \expos |
| 4426 | + template<bool OtherConst> |
| 4427 | + using @\exposid{CI}@ = counted_iterator<iterator_t<@\exposid{maybe-const}@<OtherConst, V>>>; // \expos |
| 4428 | + sentinel_t<@\exposid{Base}@> @\exposid{end_}@ = sentinel_t<@\exposid{Base}@>(); // \expos |
4428 | 4429 | public:
|
4429 | 4430 | @\exposid{sentinel}@() = default;
|
4430 | 4431 | constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end);
|
|
4433 | 4434 |
|
4434 | 4435 | constexpr sentinel_t<@\exposid{Base}@> base() const;
|
4435 | 4436 |
|
4436 |
| - friend constexpr bool operator==(const @\exposid{CI}@& y, const @\exposid{sentinel}@& x); |
| 4437 | + friend constexpr bool operator==(const @\exposid{CI}@<Const>& y, const @\exposid{sentinel}@& x); |
| 4438 | + |
| 4439 | + template<bool OtherConst = !Const> |
| 4440 | + requires @\libconcept{sentinel_for}@<sentinel_t<@\exposid{Base}@>, iterator_t<@\exposid{maybe-const}@<OtherConst, V>>> |
| 4441 | + friend constexpr bool operator==(const @\exposid{CI}@<OtherConst>& y, const @\exposid{sentinel}@& x); |
4437 | 4442 | };
|
4438 | 4443 | }
|
4439 | 4444 | \end{codeblock}
|
|
4474 | 4479 |
|
4475 | 4480 | \indexlibrarymember{operator==}{take_view::sentinel}%
|
4476 | 4481 | \begin{itemdecl}
|
4477 |
| -friend constexpr bool operator==(const @\exposid{CI}@& y, const @\exposid{sentinel}@& x); |
| 4482 | +friend constexpr bool operator==(const @\exposid{CI}@<Const>& y, const @\exposid{sentinel}@& x); |
| 4483 | + |
| 4484 | +template<bool OtherConst = !Const> |
| 4485 | + requires @\libconcept{sentinel_for}@<sentinel_t<@\exposid{Base}@>, iterator_t<@\exposid{maybe-const}@<OtherConst, V>>> |
| 4486 | +friend constexpr bool operator==(const @\exposid{CI}@<OtherConst>& y, const @\exposid{sentinel}@& x); |
4478 | 4487 | \end{itemdecl}
|
4479 | 4488 |
|
4480 | 4489 | \begin{itemdescr}
|
|
4611 | 4620 | constexpr sentinel_t<@\exposid{Base}@> base() const { return @\exposid{end_}@; }
|
4612 | 4621 |
|
4613 | 4622 | friend constexpr bool operator==(const iterator_t<@\exposid{Base}@>& x, const @\exposid{sentinel}@& y);
|
| 4623 | + |
| 4624 | + template<bool OtherConst = !Const> |
| 4625 | + requires @\libconcept{sentinel_for}@<sentinel_t<@\exposid{Base}@>, iterator_t<@\exposid{maybe-const}@<OtherConst, V>>> |
| 4626 | + friend constexpr bool operator==(const iterator_t<@\exposid{maybe-const}@<OtherConst, V>>& x, |
| 4627 | + const @\exposid{sentinel}@& y); |
4614 | 4628 | };
|
4615 | 4629 | }
|
4616 | 4630 | \end{codeblock}
|
|
4642 | 4656 | \indexlibrarymember{operator==}{take_while_view::sentinel}%
|
4643 | 4657 | \begin{itemdecl}
|
4644 | 4658 | friend constexpr bool operator==(const iterator_t<@\exposid{Base}@>& x, const @\exposid{sentinel}@& y);
|
| 4659 | + |
| 4660 | +template<bool OtherConst = !Const> |
| 4661 | + requires @\libconcept{sentinel_for}@<sentinel_t<@\exposid{Base}@>, iterator_t<@\exposid{maybe-const}@<OtherConst, V>>> |
| 4662 | +friend constexpr bool operator==(const iterator_t<@\exposid{maybe-const}@<OtherConst, V>>& x, |
| 4663 | + const @\exposid{sentinel}@& y); |
4645 | 4664 | \end{itemdecl}
|
4646 | 4665 |
|
4647 | 4666 | \begin{itemdescr}
|
|
0 commit comments