Intel: Fix default C++ dialect detection on Windows

For the Intel Compiler for Windows we have some subtle preprocessor
checks in compiler feature detection to detect C++11 and C++14 modes.
Use these when detecting the default C++ dialect too.
This commit is contained in:
Brad King
2019-10-10 10:32:28 -04:00
parent 9150c818b7
commit 847e8bc98c
2 changed files with 24 additions and 4 deletions

View File

@@ -2,7 +2,17 @@
template <long l>
struct Outputter;
#if defined(_MSC_VER) && defined(_MSVC_LANG)
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
# if defined(__INTEL_CXX11_MODE__)
# if defined(__cpp_aggregate_nsdmi)
# define CXX_STD 201402L
# else
# define CXX_STD 201103L
# endif
# else
# define CXX_STD 199711L
# endif
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
# define CXX_STD _MSVC_LANG
#else
# define CXX_STD __cplusplus