The code below:
struct Foo
{
Foo(int){} // no default constructor
};
int main()
{
Foo* pFoo = new Foo[2]{1,2}; // OK in g++, fails in clang++!
delete[] pFoo;
}
compiles in gcc, but fails in clang. Is the code above syntactically correct?