]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing constraint to std::span deduction guide [PR102280]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 15 Sep 2021 20:49:29 +0000 (21:49 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 16 Sep 2021 21:59:47 +0000 (22:59 +0100)
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/102280
* include/std/span (span(Range&&)): Add constraint to deduction
guide.

libstdc++-v3/include/std/span

index be053e8ef382448b18c2684140e709a45bbc7f96..af0d24b29f23afa3f472aeffcfadae84b3c3d82f 100644 (file)
@@ -409,7 +409,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     span(_Iter, _End)
       -> span<remove_reference_t<iter_reference_t<_Iter>>>;
 
-  template<typename _Range>
+  template<ranges::contiguous_range _Range>
     span(_Range &&)
       -> span<remove_reference_t<ranges::range_reference_t<_Range&>>>;