aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-03-05 21:08:21 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-03-07 13:47:05 +0000
commit9f40ec15a30a248d72c496614d7bcbaa9be8ca49 (patch)
tree15143339a000cb91e3bd86a1ca6a2c3cc2253935 /gcc/tree-vectorizer.h
parent9798ba2c6b4cccb17277a9d5fc04d285bf48f742 (diff)
downloadgcc-9f40ec15a30a248d72c496614d7bcbaa9be8ca49.zip
gcc-9f40ec15a30a248d72c496614d7bcbaa9be8ca49.tar.gz
gcc-9f40ec15a30a248d72c496614d7bcbaa9be8ca49.tar.bz2
libstdc++: Add missing static_assert to std::expected<void,E>::value()&&
The r15-2326-gea435261ad58ea change missed a static_assert for is_move_constructible_v in expected<cv void, E>::value()&&. When exceptions are enabled, the program is ill-formed if the error type is not move constructible, because we can't construct the std::bad_expected_access. But prior to r15-7856-gd87c0d5443ba86, using -fno-exceptions meant that we never constructed an exception, so didn't need to copy/move the error value. So that we don't rely on the r15-7856-gd87c0d5443ba86 change to the _GLIBCXX_THROW_OR_ABORT macro to consistently enforce the Mandates: conditions whether exceptions are enabled or not, we should check the requirement explicitly. This adds the missing static_assert. It also adds a test that verifies the Mandates: conditions added by LWG 3843 and 3490 are enforced even with -fno-exceptions. libstdc++-v3/ChangeLog: * include/std/expected (expected<cv void,E>::value()&&): Add missing static_assert for LWG 3940. * testsuite/20_util/expected/lwg3843.cc: New test. Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions