]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix test that fails in C++20 mode
authorJonathan Wakely <jwakely@redhat.com>
Fri, 26 Nov 2021 22:53:02 +0000 (22:53 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 26 Nov 2021 22:56:51 +0000 (22:56 +0000)
commit52b769437a4d1ca50f4ef5bdad65b12115ded845
tree7f87f82863ae8686837d9b06093e6bb0da66db5d
parent33adfd0d42e54c809b0c53212abe66e8c874b2f8
libstdc++: Fix test that fails in C++20 mode

This test was written to verify that the LWG 3265 changes work. But
those changes were superseded by LWG 3435, and the test is now incorrect
according to the current draft. The assignment operator is now
constrained to also require convertibility, which makes the test fail.

Change the Iter type to be convertible from int*, but make it throw an
exception if that conversion is used. Change the test from compile-only
to run, so we verify that the exception isn't thrown.

libstdc++-v3/ChangeLog:

* testsuite/24_iterators/move_iterator/dr3265.cc: Fix test to
account for LWG 3435 resolution.
libstdc++-v3/testsuite/24_iterators/move_iterator/dr3265.cc