|
138 | 138 | template<class I, class S, subrange_kind K>
|
139 | 139 | inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true; // freestanding
|
140 | 140 |
|
| 141 | + template<size_t N, class I, class S, subrange_kind K> |
| 142 | + requires ((N == 0 && @\libconcept{copyable}@<I>) || N == 1) |
| 143 | + constexpr auto get(const subrange<I, S, K>& r); |
| 144 | + |
| 145 | + template<size_t N, class I, class S, subrange_kind K> |
| 146 | + requires (N < 2) |
| 147 | + constexpr auto get(subrange<I, S, K>&& r); |
| 148 | +} |
| 149 | + |
| 150 | +namespace std { |
| 151 | + using ranges::get; |
| 152 | +} |
| 153 | + |
| 154 | +namespace std::ranges { |
141 | 155 | // \ref{range.dangling}, dangling iterator handling
|
142 | 156 | struct dangling; // freestanding
|
143 | 157 |
|
|
1880 | 1894 | template<@\libconcept{borrowed_range}@ R>
|
1881 | 1895 | subrange(R&&, @\placeholdernc{make-unsigned-like-t}@<range_difference_t<R>>) ->
|
1882 | 1896 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
|
1883 |
| - |
1884 |
| - template<size_t N, class I, class S, subrange_kind K> |
1885 |
| - requires ((N == 0 && @\libconcept{copyable}@<I>) || N == 1) |
1886 |
| - constexpr auto get(const subrange<I, S, K>& r); |
1887 |
| - |
1888 |
| - template<size_t N, class I, class S, subrange_kind K> |
1889 |
| - requires (N < 2) |
1890 |
| - constexpr auto get(subrange<I, S, K>&& r); |
1891 |
| -} |
1892 |
| - |
1893 |
| -namespace std { |
1894 |
| - using ranges::get; |
1895 | 1897 | }
|
1896 | 1898 | \end{codeblock}
|
1897 | 1899 |
|
|
0 commit comments