libstdc++: Fix and simplify constraints on std::span constructors
authorJonathan Wakely <jwakely@redhat.com>
Tue, 18 Feb 2020 13:12:44 +0000 (13:12 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 18 Feb 2020 17:42:54 +0000 (17:42 +0000)
commitd6c9e372372ee78283a21651313fce965d22274d
tree04b10327e356f2f4d3c9874e9c1dccbe92945b5b
parentf09f32427b21127af0ec4c4a48dc9f3b0e696e59
libstdc++: Fix and simplify constraints on std::span constructors

This makes the constraints consistent with the pre-Prague working paper.

* include/std/span (span::__is_compatible_array): Simplify alias
template by using requires-clause.
(span::__is_compatible_ref): New alias template for constraining
constructors.
(span::__is_compatible_iterator, span::__is_compatible_range): Remove.
(span(It, size_type), span(It, End)): Use __is_compatible_ref.
(span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
redundant parentheses.
(span(R&&)): Add missing constraints.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/span