File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,19 +18,29 @@ void case1()
1818 cout << " c++14 or later" << endl;
1919#elif __cplusplus >= 201103
2020 cout << " c++11 or before" << endl;
21- #else
21+ #else // __cplusplus < 201103
2222# error "c++ is too old"
23- #endif
23+ #endif // __cplusplus >= 201402
2424
2525#if __GNUC__ <= 4
2626 cout << " gcc is too old" << endl;
27- #else
27+ #else // __GNUC__ > 4
2828 cout << " gcc is good enough" << endl;
29- #endif
29+ #endif // __GNUC__ <= 4
30+
31+ #if defined(__SSE4_2__) && defined(__x86_64)
32+ cout << " we can do more optimization" << endl;
33+ #endif // defined(__SSE4_2__) && defined(__x86_64)
34+
35+ #if __linux__
36+ cout << " running on linux" << endl;
37+ #else // not linux
38+ cout << " running on others" << endl;
39+ #endif // __linux__
3040
3141#ifndef NDEBUG
3242 cout << " debug mode" << endl;
33- #endif
43+ #endif // NDEBUG
3444
3545}
3646
You can’t perform that action at this time.
0 commit comments