Implement std::span for C++20
authorJeanHeyd Meneide <phdofthehouse@gmail.com>
Thu, 5 Sep 2019 11:27:45 +0000 (11:27 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 5 Sep 2019 11:27:45 +0000 (12:27 +0100)
commit95e9a7616d363105a654f2108535f8121938bf04
tree14e109dae9d12194e175cb9eca9ed8c058ece0dd
parent056f95ec951178a110b57e58a2ee434907de2e38
Implement std::span for C++20

2019-09-05  JeanHeyd Meneide  <phdofthehouse@gmail.com>

* include/Makefile.am: Add <span> header.
* include/Makefile.in: Regenerate.
* include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
(__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
(__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
New functions for performing argument-dependent lookup of range
customization points.
* include/bits/stl_iterator.h (__normal_iterator): Add
_GLIBCXX20_CONSTEXPR to all functions.
* include/std/span: New header.
* include/std/version (__cpp_lib_span): Define feature test macro.
* testsuite/23_containers/span/contiguous_range_neg.cc: New test.
* testsuite/23_containers/span/everything.cc: New test.
* testsuite/23_containers/span/get_neg.cc: New test.
* testsuite/23_containers/span/last_neg.cc: New test.
* testsuite/23_containers/span/subspan_neg.cc: New test.
* testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
* testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
* testsuite/23_containers/span/tuple_size_neg.cc: New test.

From-SVN: r275403
15 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/range_access.h
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/include/std/span [new file with mode: 0644]
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/everything.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/get_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/last_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/subspan_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/tuple_element_dynamic_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/tuple_element_oob_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/tuple_size_neg.cc [new file with mode: 0644]