Skip to content

Commit 2fdafbe

Browse files
authored
[ranges.syn] Don't constrain specializations of enable_borrowed_range (cplusplus#4519)
These constraints redundantly repeat the constraints from the template we're partially specializing for. This isn't incorrect, but it is unnecessary, adds opportunities for editorial errors, and is inconsistent with how other partial specializations of templates for constrained types are specified.
1 parent 7d460e0 commit 2fdafbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
requires (K == subrange_kind::sized || !@\libconcept{sized_sentinel_for}@<S, I>)
128128
class subrange;
129129

130-
template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sentinel_for}@<I> S, subrange_kind K>
130+
template<class I, class S, subrange_kind K>
131131
inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true;
132132

133133
// \ref{range.dangling}, dangling iterator handling
@@ -168,7 +168,7 @@
168168
requires @\exposconcept{weakly-equality-comparable-with}@<W, Bound> && @\libconcept{semiregular}@<W>
169169
class iota_view;
170170

171-
template<@\libconcept{weakly_incrementable}@ W, @\libconcept{semiregular}@ Bound>
171+
template<class W, class Bound>
172172
inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true;
173173

174174
namespace views { inline constexpr @\unspec@ iota = @\unspec@; }

0 commit comments

Comments
 (0)