[llvm-bugs] [Bug 43602] Constexpr new doesn't work in some cases
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 8 09:22:49 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43602
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Clang and GCC are right: a constexpr object can't refer to memory allocated
with new. You can only use heap allocations transiently within an evaluation in
C++20.
(There was an additional rule that would permit examples like this, but it was
removed very late in the process when some problems were found with it that
couldn't be fixed in time for C++20. There's a good chance we'll have a fixed
version of that rule -- making this example valid -- in C++23.)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191008/1326be74/attachment-0001.html>
More information about the llvm-bugs
mailing list