# HG changeset patch # User Benjamin Golinvaux # Date 1583832849 -3600 # Node ID c1550e710410792b1d0c44339affa46a900151b0 # Parent 6cd4b7724c3d59ff54228db50f323810a6a46a67 Better C++11 detection for Visual C++ diff -r 6cd4b7724c3d -r c1550e710410 Core/Compatibility.h --- a/Core/Compatibility.h Tue Mar 10 09:49:18 2020 +0100 +++ b/Core/Compatibility.h Tue Mar 10 10:34:09 2020 +0100 @@ -47,17 +47,16 @@ // the compiler ("/Zc:__cplusplus") // To make this header more robust, we use the _MSVC_LANG equivalent macro. -# if _MSC_VER > 1900 -# if (defined _MSVC_LANG) && (_MSVC_LANG >= 201103L) -# define ORTHANC_Cxx03_DETECTED 0 -# else -# define ORTHANC_Cxx03_DETECTED 1 -# endif -# elif _MSC_VER > 1800 +// please note that not all C++11 features are supported when _MSC_VER == 1600 +// (or higher). This header file can be made for fine-grained, if required, +// based on specific _MSC_VER values + +# if _MSC_VER >= 1600 # define ORTHANC_Cxx03_DETECTED 0 # else # define ORTHANC_Cxx03_DETECTED 1 # endif + #else // of _MSC_VER is not defined, we assume __cplusplus is correctly defined // if __cplusplus is not defined (very old compilers??), then the following