Created
April 5, 2017 10:21
-
-
Save dibayendu/06b5e8460bcba4c6e04e010efdea2ad6 to your computer and use it in GitHub Desktop.
Determines the version or standard of C++ compiler
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
#include <iostream> | |
int main(){ | |
#if __cplusplus==201402L | |
std::cout << "C++14" << std::endl; | |
#elif __cplusplus==201103L | |
std::cout << "C++11" << std::endl; | |
#elif __cplusplus==199711L | |
std::cout << "C++07" << std::endl; | |
#else | |
std::cout << "No idea what standard of C++ it is!" << std::endl; | |
#endif | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment