Skip to content

Instantly share code, notes, and snippets.

@yohhoy
Created April 18, 2019 15:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yohhoy/a17802475917d77739ba3693edd0b067 to your computer and use it in GitHub Desktop.
Save yohhoy/a17802475917d77739ba3693edd0b067 to your computer and use it in GitHub Desktop.
compiler version snippet
#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
@yohhoy
Copy link
Author

yohhoy commented Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment