[Bug c++/98933] P0784R7 example support: constexpr new

2021-02-03 Thread markus.kuehni at triviso dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98933 Mark changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/98933] P0784R7 example support: constexpr new

2021-02-02 Thread markus.kuehni at triviso dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98933 --- Comment #4 from Mark --- So this is the only way? ``` #include template struct S { std::size_t sz; T *ps; template constexpr S(T (&p)[N]) : sz { N }, ps {p} {} }; static constexpr char bu

[Bug c++/98933] P0784R7 example support: constexpr new

2021-02-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98933 --- Comment #3 from Jakub Jelinek --- You just need to allocate and deallocate during the same constexpr evaluation. So doing constexpr int foo () { ... std::construct_at(...); ... ... std::destroy_at(...); ... return ...; } is fine, bu

[Bug c++/98933] P0784R7 example support: constexpr new

2021-02-02 Thread markus.kuehni at triviso dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98933 --- Comment #2 from Mark --- (In reply to Jakub Jelinek from comment #1) > Have you noticed the > In Kona 2019, this approach was considered too brittle, and as a result > non-transient allocation was removed from the feature set. > line just be

[Bug c++/98933] P0784R7 example support: constexpr new

2021-02-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98933 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1