Created
July 14, 2020 17:28
-
-
Save packrat386/b4c23a6dbcab13547fea2696105634cf 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
[fg-386] ~ > cat sanity.cpp | |
#include <iostream> | |
#include <unordered_set> | |
using namespace std; | |
int main(int argc, char* argv[]) | |
{ | |
auto myset = unordered_set<int>{1,2,3}; | |
cout << "here we go!" << endl; | |
for (auto item : myset) { | |
cout << item << endl; | |
} | |
cout << "done!" << endl; | |
} | |
[fg-386] ~ > clang++ -std=c++11 -stdlib=libc++ -Weverything sanity.cpp -o sanity.exe | |
sanity.cpp:8:3: warning: 'auto' type specifier is incompatible with C++98 [-Wc++98-compat] | |
auto myset = unordered_set<int>{1,2,3}; | |
^~~~ | |
sanity.cpp:8:34: warning: generalized initializer lists are incompatible with C++98 [-Wc++98-compat] | |
auto myset = unordered_set<int>{1,2,3}; | |
^ | |
sanity.cpp:8:34: warning: initialization of initializer_list object is incompatible with C++98 [-Wc++98-compat] | |
auto myset = unordered_set<int>{1,2,3}; | |
^~~~~~~ | |
sanity.cpp:11:8: warning: 'auto' type specifier is incompatible with C++98 [-Wc++98-compat] | |
for (auto item : myset) { | |
^~~~ | |
sanity.cpp:11:18: warning: range-based for loop is incompatible with C++98 [-Wc++98-compat] | |
for (auto item : myset) { | |
^ | |
sanity.cpp:6:14: warning: unused parameter 'argc' [-Wunused-parameter] | |
int main(int argc, char* argv[]) | |
^ | |
sanity.cpp:6:26: warning: unused parameter 'argv' [-Wunused-parameter] | |
int main(int argc, char* argv[]) | |
^ | |
7 warnings generated. | |
[fg-386] ~ > ./sanity.exe | |
here we go! | |
3 | |
2 | |
1 | |
done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment