[clang] [clang][P2719] Relax requirements for matching operator new and delete (PR #195779)
Lauri Vasama via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 04:01:42 PDT 2026
vasama wrote:
> The next revision of P2719 resolves this by removing the exact type matching requirements and simply enforcing the intended semantics directly: if a type aware allocation function is called and there is a need for exception cleanup, it is an error if an appropriate operator delete cannot be found.
I'm certainly in favour of this.
However, relaxing requirements for matching placement allocation and deallocation functions sounds suspicious to me. Especially since `type_identity_t` is not a new type. Although the likelihood that someone already has such a placement allocation function without a matching deallocation function that would now fail to compile seems low enough, and neither is this failure mode likely to be very dangerous.
https://github.com/llvm/llvm-project/pull/195779
More information about the cfe-commits
mailing list