Skip to content

Commit ce1a62f

Browse files
one test to start with
1 parent 6560dd5 commit ce1a62f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

libcxx/test/std/containers/associative/map/map.cons/alloc.pass.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// class map
1212

13-
// explicit map(const allocator_type& a);
13+
// explicit map(const allocator_type& a); // constexpr since C++26
1414

1515
#include <map>
1616
#include <cassert>
@@ -19,7 +19,7 @@
1919
#include "test_allocator.h"
2020
#include "min_allocator.h"
2121

22-
int main(int, char**) {
22+
TEST_CONSTEXPR_CXX26 bool test() {
2323
{
2424
typedef std::less<int> C;
2525
typedef test_allocator<std::pair<const int, double> > A;
@@ -46,6 +46,13 @@ int main(int, char**) {
4646
assert(m.get_allocator() == A());
4747
}
4848
#endif
49+
return true;
50+
}
4951

52+
int main(int, char**) {
53+
test();
54+
#if TEST_STD_VER >= 26
55+
static_assert(test());
56+
#endif
5057
return 0;
5158
}

0 commit comments

Comments
 (0)