PR c++/91369 - Implement P0784R7: constexpr new
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 Oct 2019 21:55:12 +0000 (22:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 Oct 2019 21:55:12 +0000 (22:55 +0100)
commitcf650568d8f0a1bfc5293447e45117e0623fa908
tree5ff224ee73b02b90dfdffbaf911a43ff72bd31f4
parent97ccc60e0c8590e22488e909464fc591eb8b0534
PR c++/91369 - Implement P0784R7: constexpr new

PR c++/91369 - Implement P0784R7: constexpr new
* constexpr.c (cxx_replaceable_global_alloc_fn): Don't return true
for placement new.
(cxx_placement_new_fn, is_std_construct_at): New functions.
(cxx_eval_call_expression): Allow placement new in std::construct_at.
(potential_constant_expression_1): Likewise.

* g++.dg/cpp2a/constexpr-new5.C: New test.

From-SVN: r277649
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C [new file with mode: 0644]