[committed 4/4] libstdc++: P1976R2 Fixed-size span construction from dynamic range
Jonathan Wakely
jwakely@redhat.com
Tue Feb 18 17:52:00 GMT 2020
This includes fixes for first, last, as_bytes and as_writable_bytes
which were missing from the paper.
* include/std/span (__cpp_lib_span): Update value.
(span(It, size_type), span(It, End)): Make conditionally explicit. Add
assertion.
(span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
constraints.
(span::first<Count>(), span::last<Count>()): Use explicit type in
return statement.
(as_bytes, as_writable_bytes): Likewise.
* include/std/version (__cpp_lib_span): Update value.
* testsuite/23_containers/span/1.cc: Check new value.
* testsuite/23_containers/span/2.cc: Check new value.
* testsuite/23_containers/span/explicit.cc: New test.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 10308 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20200218/574f41ef/attachment.bin>
More information about the Libstdc++
mailing list