Check precondition for std::ssize(const Container&)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 31 Oct 2019 09:39:48 +0000 (09:39 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 31 Oct 2019 09:39:48 +0000 (09:39 +0000)
commit164abd6786e5ddab0c3a4a0a9a6cdc67f84b1a17
tree5c1f4a96d5ae2adbfd3454fb751c276b64500370
parent83f58fe3ad862955b16e6a2f14ad69a1e82dd3ed
Check precondition for std::ssize(const Container&)

This precondition is the subject of a national body comment on the C++20
CD. This just adds a test to ensure we enforce the precondition.

Also move existing 24_iterator/range_access*.cc tests to a dedicated
directory for the [iterator.range] subclause.

* testsuite/24_iterators/range_access*.cc: Move to ...
* testsuite/24_iterators/range_access/range_access*.cc: ... here.
* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New
test.

From-SVN: r277658
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/24_iterators/range_access.cc [deleted file]
libstdc++-v3/testsuite/24_iterators/range_access/range_access.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp14.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp17_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp20.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access/range_access_cpp20_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc [deleted file]
libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc [deleted file]
libstdc++-v3/testsuite/24_iterators/range_access_cpp17_neg.cc [deleted file]
libstdc++-v3/testsuite/24_iterators/range_access_cpp20.cc [deleted file]