Common values of MSVC version for C++ compilers

( wiki and blog ):

You should be able to make use of something like #ifdef _MSC_VER and #if _MSC_VER > 1400 or whatever your specific needs are.

Note: The value of _MSC_VER (equal to the installation directory VC\Tools\MSVC\xxx) differs from all other reported version numbers, such as the Visual Studio year or the Visual Studio version, that can be seen inside the Help / About Microsoft Visual Studio box. It even differs from the version, reported by the cl.exe compiler. A thorough list of predefined macros in many compilers is available.

For example - on my installation: