]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Don't constrain some enable_borrowed_range specializations
authorPatrick Palka <ppalka@redhat.com>
Wed, 5 May 2021 16:07:52 +0000 (12:07 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 5 May 2021 16:07:52 +0000 (12:07 -0400)
These constraints are already present on the template we're partially
specializing for.

libstdc++-v3/ChangeLog:

* include/bits/ranges_util.h (enable_borrowed_range<subrange>):
Remove constraints on this partial specialization.
* include/std/ranges (enable_borrowed_range<iota_view>):
Likewise.

libstdc++-v3/include/bits/ranges_util.h
libstdc++-v3/include/std/ranges

index 589886eb15752ec817e675f55bb391871ce88c82..b73fc121e0ffb176a65a720a81ba7fbdbbde38c6 100644 (file)
@@ -381,8 +381,7 @@ namespace ranges
        return __r.end();
     }
 
-  template<input_or_output_iterator _It, sentinel_for<_It> _Sent,
-          subrange_kind _Kind>
+  template<typename _It, typename _Sent, subrange_kind _Kind>
     inline constexpr bool
       enable_borrowed_range<subrange<_It, _Sent, _Kind>> = true;
 
index f21e08a36e3bc2a6582d2a253ae1e0b9d89e78eb..2305bd200a53c3b5a52475f856dc0650a8a7f8ec 100644 (file)
@@ -586,7 +586,7 @@ namespace ranges
            == __detail::__is_signed_integer_like<_Bound>))
     iota_view(_Winc, _Bound) -> iota_view<_Winc, _Bound>;
 
-  template<weakly_incrementable _Winc, semiregular _Bound>
+  template<typename _Winc, typename _Bound>
     inline constexpr bool
       enable_borrowed_range<iota_view<_Winc, _Bound>> = true;