For what can be supported, see https://en.cppreference.com/w/cpp/compiler_support
Compilers generally have flags to select a version to conform to, and possibly for specific features. There are also several macros you can check. But beware of bugs and lies.