[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
Mon Jun 15 01:11:15 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:
I think my previous suggestion still relies on `static` under the hood , since we need to track calls to `DefaultOnly::DefaultOnly()` here, and accessing a static in that function would not be allowed during a constant expression.
@philnik777 Can you elaborate on your suggestion about using an argument with pseudo code?
https://github.com/llvm/llvm-project/pull/161901
More information about the libcxx-commits
mailing list