File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set(SOURCES
66 noexcept_tests.cpp
77 equality_tests.cpp
88 lwg_3886_tests.cpp
9+ lwg_4031_tests.cpp
910)
1011
1112find_package (Catch2 3 REQUIRED )
Original file line number Diff line number Diff line change 1+ #include < catch2/catch_all.hpp>
2+
3+ #include < zeus/expected.hpp>
4+
5+ using namespace zeus ;
6+
7+ namespace
8+ {
9+ // Exposing all members for testing
10+ struct test_bad_expected_access : public bad_expected_access <void >
11+ {
12+ using bad_expected_access<void >::bad_expected_access;
13+ };
14+ }
15+
16+ TEST_CASE (" bad_expected_access<void> special members are noexcept" , " [LWG-4031]" )
17+ {
18+ STATIC_REQUIRE (std::is_nothrow_default_constructible_v<test_bad_expected_access>);
19+ STATIC_REQUIRE (std::is_nothrow_copy_constructible_v<test_bad_expected_access>);
20+ STATIC_REQUIRE (std::is_nothrow_move_constructible_v<test_bad_expected_access>);
21+ STATIC_REQUIRE (std::is_nothrow_copy_assignable_v<test_bad_expected_access>);
22+ STATIC_REQUIRE (std::is_nothrow_move_assignable_v<test_bad_expected_access>);
23+ STATIC_REQUIRE (std::is_nothrow_destructible_v<test_bad_expected_access>);
24+ }
You can’t perform that action at this time.
0 commit comments