From 2c43a2e9e011fe43cba87bc9df5a8da386e8599a Mon Sep 17 00:00:00 2001 From: Martin Moene Date: Fri, 25 Sep 2015 10:13:02 +0200 Subject: [PATCH] Change compiler version handling --- lest_cpp03.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lest_cpp03.hpp b/lest_cpp03.hpp index 6e181dc..0f0d425 100644 --- a/lest_cpp03.hpp +++ b/lest_cpp03.hpp @@ -74,14 +74,20 @@ # endif #endif -#if ( __cplusplus >= 201103L ) -# define lest_CPP11_OR_GREATER +#if defined(_MSC_VER) +# define lest_COMPILER_MSVC_VERSION ((_MSC_VER - 600 ) / 100) +#else +# define lest_COMPILER_MSVC_VERSION 0 #endif -#if defined( _MSC_VER ) && ( 1200 <= _MSC_VER && _MSC_VER < 1300 ) +#if lest_COMPILER_MSVC_VERSION == 6 # define lest_COMPILER_IS_MSVC6 #endif +#if ( __cplusplus >= 201103L ) || lest_COMPILER_MSVC_VERSION >= 12 +# define lest_CPP11_OR_GREATER +#endif + #ifdef lest_CPP11_OR_GREATER # include