4 ms·
That's only from C++11. The story I was telling you was from before then. $ cat test.cc enum Foo { FOO, BAR, }; int main(int argc, c
by fnord123 5y ago
That's only from C++11. The story I was telling you was from before then.
$ cat test.cc
enum Foo {
FOO,
BAR,
};
int main(int argc, char** argv) { return 0; }
$ g++ -std=c++98 -Wpedantic test.cc
test.cc:3:5: warning: comma at end of enumerator list [-Wpedantic]
3 | BAR,
|
$ g++ -std=c++03 -Wpedantic test.cc
test.cc:3:5: warning: comma at end of enumerator list [-Wpedantic]
3 | BAR,
| ^
$ g++ -std=c++11 -Wpedantic test.cc