Created
June 18, 2012 16:53
-
-
Save tetsuok/2949380 to your computer and use it in GitHub Desktop.
unnamed type
This file contains hidden or 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
| // clang++ 3.1 warns template argument uses unnamed type [-Wunnamed-type-template-args], | |
| // but compiles without error although GCC (4.2, 4.4.3) complained. | |
| #include <algorithm> | |
| #include <vector> | |
| using namespace std; | |
| enum { | |
| SENTINEL = -1 | |
| }; | |
| int main() { | |
| vector<int> v(5); | |
| fill(v.begin(), v.end(), SENTINEL); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment