comparison Core/Compatibility.h @ 3732:6cd4b7724c3d

tentative fix of std::unique_ptr compilation issue for VS2015
author Alain Mazy <alain@mazy.be>
date Tue, 10 Mar 2020 09:49:18 +0100
parents 0b3aacdf77f5
children c1550e710410
comparison
equal deleted inserted replaced
3730:ae31ba2b09a6 3732:6cd4b7724c3d
38 38
39 //#pragma message("__cplusplus = " Orthanc_Compatibility_h_STR1(__cplusplus)) 39 //#pragma message("__cplusplus = " Orthanc_Compatibility_h_STR1(__cplusplus))
40 40
41 #if (defined _MSC_VER) 41 #if (defined _MSC_VER)
42 //# pragma message("_MSC_VER = " Orthanc_Compatibility_h_STR1(_MSC_VER)) 42 //# pragma message("_MSC_VER = " Orthanc_Compatibility_h_STR1(_MSC_VER))
43 //# pragma message("_MSVC_LANG = " Orthanc_Compatibility_h_STR1(_MSVC_LANG))
43 // The __cplusplus macro cannot be used in Visual C++ < 1914 (VC++ 15.7) 44 // The __cplusplus macro cannot be used in Visual C++ < 1914 (VC++ 15.7)
44 // However, even in recent versions, __cplusplus will only be correct (that is, 45 // However, even in recent versions, __cplusplus will only be correct (that is,
45 // correctly defines the supported C++ version) if a special flag is passed to 46 // correctly defines the supported C++ version) if a special flag is passed to
46 // the compiler ("/Zc:__cplusplus") 47 // the compiler ("/Zc:__cplusplus")
47 // To make this header more robust, we use the _MSVC_LANG equivalent macro. 48 // To make this header more robust, we use the _MSVC_LANG equivalent macro.
48 # if (defined _MSVC_LANG) && (_MSVC_LANG >= 201103L) 49
50 # if _MSC_VER > 1900
51 # if (defined _MSVC_LANG) && (_MSVC_LANG >= 201103L)
52 # define ORTHANC_Cxx03_DETECTED 0
53 # else
54 # define ORTHANC_Cxx03_DETECTED 1
55 # endif
56 # elif _MSC_VER > 1800
49 # define ORTHANC_Cxx03_DETECTED 0 57 # define ORTHANC_Cxx03_DETECTED 0
50 # else 58 # else
51 # define ORTHANC_Cxx03_DETECTED 1 59 # define ORTHANC_Cxx03_DETECTED 1
52 # endif 60 # endif
53 #else 61 #else