jwakely added a comment.

In D68364#2293971 <https://reviews.llvm.org/D68364#2293971>, @leonardchan wrote:

> Is there a recommended way for working around this? We're using GCC 10.2.1. 
> Thanks.

I don't think your implementation is valid. I think P0784 only allows 
new-expressions and calls to `std::allocator::allocate` in constexpr functions, 
not calls to `operator new`.

Can you use something like `if (__builtin_is_constant_evaluated() return new 
unsigned char[n];` and the equivalent in the corresponding deallocation 
function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68364/new/

https://reviews.llvm.org/D68364

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to