|
130 | 130 | template<class I, class S, subrange_kind K>
|
131 | 131 | inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true;
|
132 | 132 |
|
| 133 | + template<size_t N, class I, class S, subrange_kind K> |
| 134 | + requires ((N == 0 && @\libconcept{copyable}@<I>) || N == 1) |
| 135 | + constexpr auto get(const subrange<I, S, K>& r); |
| 136 | + |
| 137 | + template<size_t N, class I, class S, subrange_kind K> |
| 138 | + requires (N < 2) |
| 139 | + constexpr auto get(subrange<I, S, K>&& r); |
| 140 | +} |
| 141 | + |
| 142 | +namespace std { |
| 143 | + using ranges::get; |
| 144 | +} |
| 145 | + |
| 146 | +namespace std::ranges { |
133 | 147 | // \ref{range.dangling}, dangling iterator handling
|
134 | 148 | struct dangling;
|
135 | 149 |
|
|
1741 | 1755 | template<@\libconcept{borrowed_range}@ R>
|
1742 | 1756 | subrange(R&&, @\placeholdernc{make-unsigned-like-t}@<range_difference_t<R>>) ->
|
1743 | 1757 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
|
1744 |
| - |
1745 |
| - template<size_t N, class I, class S, subrange_kind K> |
1746 |
| - requires ((N == 0 && @\libconcept{copyable}@<I>) || N == 1) |
1747 |
| - constexpr auto get(const subrange<I, S, K>& r); |
1748 |
| - |
1749 |
| - template<size_t N, class I, class S, subrange_kind K> |
1750 |
| - requires (N < 2) |
1751 |
| - constexpr auto get(subrange<I, S, K>&& r); |
1752 |
| -} |
1753 |
| - |
1754 |
| -namespace std { |
1755 |
| - using ranges::get; |
1756 | 1758 | }
|
1757 | 1759 | \end{codeblock}
|
1758 | 1760 |
|
|
0 commit comments