llvm-project
7cb66a44 - [libc++] Implement LWG4477: placement operator delete should be constexpr (#189915)

Commit
28 days ago
[libc++] Implement LWG4477: placement operator delete should be constexpr (#189915) Implement the proposed resolution of [LWG4477](https://cplusplus.github.io/LWG/issue4477). P2747R2 made placement `operator new` constexpr since C++26, but the corresponding placement `operator delete` was not. When a constructor throws during placement new in a constant expression, the placement delete is invoked and fails because it's not constexpr. Add `_LIBCPP_CONSTEXPR_SINCE_CXX26` to placement `operator delete(void*, void*)` and `operator delete[](void*, void*)`. Closes #189843
Author
Parents
Loading