We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0574be6 commit ed995a2Copy full SHA for ed995a2
libcxx/test/std/containers/associative/map/map.access/at.pass.cpp
@@ -42,11 +42,16 @@ TEST_CONSTEXPR_CXX26 bool test() {
42
assert(m.at(4) == 4.5);
43
assert(m.at(5) == 5.5);
44
#ifndef TEST_HAS_NO_EXCEPTIONS
45
+
46
+// throwing is not allowed in constexpr
47
+#if TEST_STD_VER < 26
48
try {
49
TEST_IGNORE_NODISCARD m.at(6);
50
assert(false);
51
} catch (std::out_of_range&) {
52
}
53
+#endif
54
55
#endif
56
assert(m.at(7) == 7.5);
57
assert(m.at(8) == 8.5);
0 commit comments