Created
May 2, 2020 10:02
-
-
Save johnmcfarlane/b519528f22a26584948a77b47dba2c7b to your computer and use it in GitHub Desktop.
Script for printing compiler version and language revision as a diagnostic
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
template <int c, long s> struct _; | |
#if defined(__clang__) | |
_<__clang_major__, __cplusplus> clang_version_and_standard; | |
#elif defined(__GNUC__) | |
_<__GNUC__, __cplusplus> gcc_version_and_standard; | |
#elif defined(_MSC_VER) | |
_<_MSC_VER, __cplusplus> msvc_version_and_standard; | |
#else | |
#error "I don't know that compiler" | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment