Skip to content

Commit f400d80

Browse files
jensmaurertkoeppe
authored andcommitted
[ranges.syn] Move namespace-scope declarations for get(subrange) here
1 parent f055ba0 commit f400d80

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

source/ranges.tex

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,20 @@
138138
template<class I, class S, subrange_kind K>
139139
inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true; // freestanding
140140

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 {
141155
// \ref{range.dangling}, dangling iterator handling
142156
struct dangling; // freestanding
143157

@@ -1880,18 +1894,6 @@
18801894
template<@\libconcept{borrowed_range}@ R>
18811895
subrange(R&&, @\placeholdernc{make-unsigned-like-t}@<range_difference_t<R>>) ->
18821896
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;
18951897
}
18961898
\end{codeblock}
18971899

0 commit comments

Comments
 (0)