[libcxx-commits] [libcxx] [libc++] Avoid discarding const-ness when copy-constructing vectors (PR #69988)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 31 00:11:43 PDT 2025


philnik777 wrote:

This is actually a precondition violation, since https://eel.is/c++draft/container.requirements#container.reqmts-12 says T has to be Cpp17CopyInsertable, which in turn says `allocator_traits<A>::construct(m, p, v)` is valid and "The value of v is unchanged and is equivalent to *p.". "v denotes an lvalue of type (possibly const) X or an rvalue of type const X," according to https://eel.is/c++draft/container.requirements#container.intro.reqmts-1.6.

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


More information about the libcxx-commits mailing list