Created
March 27, 2012 22:04
-
-
Save phst/2220810 to your computer and use it in GitHub Desktop.
Brace initialization bug
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
void foo() { | |
new int[1] {1}; | |
} | |
template<int A> | |
void goo() { | |
new int[1] {1}; | |
} | |
int main() { | |
foo(); | |
goo<1>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above code produces an error with G++ 4.7:
Commenting out the instantiation of
goo
removes the error.