When is _MSC_VER defined in 2013 version of the C++ compiler ?
_MSC_VER is always defined whenever you are using our Windows based (icl) compiler. It is set to whatever version of the Microsoft compiler is in your PATH.
If you need a complete list of _MSC_VER values for different MS Visual C++ compilers and Visual Studios take a look at MSDN. If you're unable to find let me know and I will check some headers I have.
How are those header files named?
As far as I can see, MSC_VER is not defined in the Microsoft headers, although many of them check the value. The presence of a definition is often used to determine that Microsoft CL is present.
Tim is correct. _MSC_VER is predefined by the compiler, not in any header. You can see this with this simple program where cl is pointing at MSVC++ 2008 (microsoft_version 1500):
!% cat t.cpp
!% icl -E t.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version Mainline Bet
a Build x
Built Nov 20 2013 11:49:27 by jward4 on JWARD4-DESK in D:/workspaces/cfe/dev
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
#line 1 "t.cpp"
>>How are those header files named?
Sorry, I didn't understand what do you mean...
Sorry for badly formulated question.
I wanted to ask what is the name of those header files which were mentioned in your post.
>>...I wanted to ask what is the name of those header files which were mentioned in your post.
This is an internal header file and in another words it is a proprietary. However, _MSC_VER version codes are Not proprietary and available to everybody ( Microsoft shares it freely ).
I have found the needed info on MSDN.