changeset 3733:c1550e710410

Better C++11 detection for Visual C++
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 10 Mar 2020 10:34:09 +0100
parents 6cd4b7724c3d
children a35fb06514e7 33c19a6643e1
files Core/Compatibility.h
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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