# HG changeset patch
# User Alain Mazy <alain@mazy.be>
# Date 1583162291 -3600
# Node ID e9029cb94d7c974eb13e4140272163e03a05bb08
# Parent  2a170a8f1faf08e9f5310f2f3791705ca7deeef0
fix unique_ptr cpp compat for MSVC

diff -r 2a170a8f1faf -r e9029cb94d7c Core/Compatibility.h
--- a/Core/Compatibility.h	Mon Mar 02 15:32:45 2020 +0100
+++ b/Core/Compatibility.h	Mon Mar 02 16:18:11 2020 +0100
@@ -33,7 +33,23 @@
 
 #pragma once
 
-#if __cplusplus < 201103L
+// __cplusplus cannot be used in Visual C++ versions older than 1914
+#if (defined _MSC_VER) && (_MSC_VER < 1914)
+#  if _MSC_VER < 1900
+#    define ORTHANC_Cxx03_DETECTED 1
+#  else
+#    define ORTHANC_Cxx03_DETECTED 0
+#  endif
+#else
+#  if __cplusplus < 201103L
+#    define ORTHANC_Cxx03_DETECTED 1
+#  else
+#    define ORTHANC_Cxx03_DETECTED 0
+#  endif
+#endif
+
+
+#if ORTHANC_Cxx03_DETECTED == 1
 /**
  * "std::unique_ptr" was introduced in C++11, and "std::auto_ptr" was
  * removed in C++17. We emulate "std::auto_ptr" using boost: "The