I am using Visual Studio 2015 Update 3 and my _MSVC_LANG is defined as 201402L, regardless of whether I supply /std:c++14 as compiler parameter or not.
Does _MSVC_LANG have other values in later or earlier versions of visual-c++?
I am using Visual Studio 2015 Update 3 and my _MSVC_LANG is defined as 201402L, regardless of whether I supply /std:c++14 as compiler parameter or not.
Does _MSVC_LANG have other values in later or earlier versions of visual-c++?
Prior to Visual Studio 2015, the _MSVC_LANG macro didn't exist (internally they relied on the __cplusplus macro containing the equivalent version number).
In Visual Studio's yvals.h header, you can see the logic for C++ version macros (this is from Visual Studio 2017 15.3.3):
#ifndef _HAS_CXX17
#if defined(_MSVC_LANG) && !(defined(__EDG__) && defined(__clang__)) // TRANSITION, VSO#273681
#if _MSVC_LANG > 201402
#define _HAS_CXX17 1
#else /* _MSVC_LANG > 201402 */
#define _HAS_CXX17 0
#endif /* _MSVC_LANG > 201402 */
#else /* _MSVC_LANG etc. */
#if __cplusplus > 201402
#define _HAS_CXX17 1
#else /* __cplusplus > 201402 */
#define _HAS_CXX17 0
#endif /* __cplusplus > 201402 */
#endif /* _MSVC_LANG etc. */
#endif /* _HAS_CXX17 */
The preprocessor definitions _HAS_CXX17 & _HAS_CXX14 control the inclusion of STL features.