[libcxx-commits] [libcxx] [libc++] Fix constant initialization of unique_ptr in C++17 and prior (PR #108956)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 17 08:23:58 PDT 2024


philnik777 wrote:

> Would these tests fail if we refactored to run them in a `constexpr` context, or is this _required_ to use `constinit`? I'm worried that this is a roundabout way of testing this and that we could lose the coverage in the future via some refactoring.

It requires constant initialization, since `unique_ptr` isn't fully `constexpr` before C++23(or 26?).

https://github.com/llvm/llvm-project/pull/108956


More information about the libcxx-commits mailing list