Created
June 27, 2012 23:06
-
-
Save Themaister/3007477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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