[libcxx-commits] [libcxx] [libc++] Make `<map>` `std::multimap` constexpr as part of P3372R3 (PR #161901)
Vinay Deshmukh via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 10 01:17:00 PDT 2026
================
@@ -23,32 +23,36 @@
#include "DefaultOnly.h"
#include "min_allocator.h"
-int main(int, char**) {
- {
- typedef std::multimap<int, DefaultOnly> M;
- typedef M::iterator R;
- M m;
+TEST_CONSTEXPR_CXX26
+bool test() {
+ // DefaultOnly::count is static
----------------
vinay-deshmukh wrote:
Got it. Will send a separate patch.
I'm thinking something like:
```
{
CounterScopeGuard g(0);
std::map<Counter<...>, ...>
...
Assert(g.value == 3);
}
```
And remove the Counter_base class entirely (and equivalent implementation for Default only)
Does that sound good?
https://github.com/llvm/llvm-project/pull/161901
More information about the libcxx-commits
mailing list