mirror of
https://github.com/reactos/CMake.git
synced 2025-02-12 14:58:45 +00:00
![Brad King](/assets/img/avatar_default.png)
Visual Studio 2015 Update 3 introduced the notion of language standard levels to MSVC. The language standard level is defined in `_MSVC_LANG` instead of `__cplusplus`. It also added support for the `-std:c++14` and `-std:c++latest` flags, although the compiler defaults to its C++14 mode anyway. Visual Studio 2017 Update 3 will introduce support for the `-std:c++17` flag. Fixes: #16482
36 lines
566 B
C++
36 lines
566 B
C++
|
|
template <long l>
|
|
struct Outputter;
|
|
|
|
#if defined(_MSC_VER) && defined(_MSVC_LANG)
|
|
#define CXX_STD _MSVC_LANG
|
|
#else
|
|
#define CXX_STD __cplusplus
|
|
#endif
|
|
|
|
#if DEFAULT_CXX17
|
|
#if CXX_STD <= 201402L
|
|
Outputter<CXX_STD> o;
|
|
#endif
|
|
#elif DEFAULT_CXX14
|
|
#if CXX_STD != 201402L
|
|
Outputter<CXX_STD> o;
|
|
#endif
|
|
#elif DEFAULT_CXX11
|
|
#if CXX_STD != 201103L
|
|
Outputter<CXX_STD> o;
|
|
#endif
|
|
#else
|
|
#if !DEFAULT_CXX98
|
|
#error Buildsystem error
|
|
#endif
|
|
#if CXX_STD != 199711L && CXX_STD != 1 && !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
|
Outputter<CXX_STD> o;
|
|
#endif
|
|
#endif
|
|
|
|
int main()
|
|
{
|
|
return 0;
|
|
}
|