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 6560dd5 commit ce1a62fCopy full SHA for ce1a62f
libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp
@@ -10,7 +10,7 @@
10
11
// class map
12
13
-// explicit map(const allocator_type& a);
+// explicit map(const allocator_type& a); // constexpr since C++26
14
15
#include <map>
16
#include <cassert>
@@ -19,7 +19,7 @@
19
#include "test_allocator.h"
20
#include "min_allocator.h"
21
22
-int main(int, char**) {
+TEST_CONSTEXPR_CXX26 bool test() {
23
{
24
typedef std::less<int> C;
25
typedef test_allocator<std::pair<const int, double> > A;
@@ -46,6 +46,13 @@ int main(int, char**) {
46
assert(m.get_allocator() == A());
47
}
48
#endif
49
+ return true;
50
+}
51
52
+int main(int, char**) {
53
+ test();
54
+#if TEST_STD_VER >= 26
55
+ static_assert(test());
56
+#endif
57
return 0;
58
0 commit comments