Skip to content

Instantly share code, notes, and snippets.

@Themaister
Created June 27, 2012 23:06
Show Gist options
  • Save Themaister/3007477 to your computer and use it in GitHub Desktop.
Save Themaister/3007477 to your computer and use it in GitHub Desktop.
struct Bar
{
Bar();
Bar(int);
};
struct Meow
{
Meow(int a, Bar b);
};
struct Foo
{
Bar b;
Meow m;
unsigned u;
};
Meow test_meow()
{
return {10, {}};
}
Foo test()
{
return {10, {10, {}}, 0};
}
// G++ 4.7.1 compiles fine.
// Clang++ 3.1:
// test2.cpp:21:16: error: initialization of non-aggregate type 'Meow' with an
// initializer list
// return {10, {10, {}}, 0};
// ^~~~~~~~
// 1 error generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment