Created
April 18, 2019 15:57
-
-
Save yohhoy/a17802475917d77739ba3693edd0b067 to your computer and use it in GitHub Desktop.
compiler version snippet
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
#if defined(__clang__) | |
#pragma message "Clang " __VERSION__ | |
#elif defined(__GNUC__) | |
#pragma message "GCC " __VERSION__ | |
#elif defined(_MSC_VER) | |
// https://qiita.com/yumetodo/items/8c112fca0a8e6b47072d | |
#define STR(s) #s | |
#define DUMP(s) #s "=" STR(s) | |
#pragma message ("MSVC " DUMP(_MSC_VER) " " DUMP(_MSC_FULL_VER)) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gcc.godbolt.org/z/232yTJ