On 12/5/19 4:12 PM, Richard Biener wrote:
Isn't there std::default_constructible? Also after your patch it's far from obvious which api to use.
Will it work with: struct Foo { Foo(int) {} }; ... if (std::default_constructible<T> ()) ptr = new ptr T (); ? Wouldn't we end up with a compilation error that T() does not exist? Well, I don't insist on the ggc_new function. I can easily leave it. Martin
Richard.