g++ -x c++ -std=c++17 -dM -E - </dev/null | grep __cplusplus
useful for optioning c++17 features like so,
#if __cplusplus >= 201703L
auto fsize = filesystem::file_size(argv[1]);
#else
struct stat filestatus;
stat (argv[1], &filestatus);
auto fsize = filestatus.st_size;
#endif
gcc -v -E - < /dev/null 2>&1 | awk '/^#include/,/^End of search/' | grep '^ '.