[Bug c++/92878] New: Parenthesized aggregate initialization doesn't work in a new-expression
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 9 22:54:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92878
Bug ID: 92878
Summary: Parenthesized aggregate initialization doesn't work in
a new-expression
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Target Milestone: ---
//#include <memory>
struct aggressive_aggregate
{
int a;
int b;
};
int main()
{
auto x = aggressive_aggregate(1,2); // OK
auto y = new aggressive_aggregate(1,2); // rejected, should be OK?
//auto z = std::make_unique<aggressive_aggregate>(1,2); // rejected, should
be OK?
}
More information about the Gcc-bugs
mailing list