aboutsummaryrefslogtreecommitdiff
path: root/ports/yaml-cpp/0001-noexcept.patch
blob: eb208eb5e0e6443091283f03983e4c64bf85783c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h
index 9c96859..a6045ee 100644
--- a/include/yaml-cpp/exceptions.h
+++ b/include/yaml-cpp/exceptions.h
@@ -15,10 +15,10 @@
 
 // This is here for compatibility with older versions of Visual Studio
 // which don't support noexcept
-#ifdef _MSC_VER
-    #define YAML_CPP_NOEXCEPT _NOEXCEPT
-#else
+#if _MSC_VER >= 1900
     #define YAML_CPP_NOEXCEPT noexcept
+#else
+    #define YAML_CPP_NOEXCEPT _NOEXCEPT
 #endif
 
 namespace YAML {
diff --git a/src/exceptions.cpp b/src/exceptions.cpp
index 9b6d891..931b4bc 100644
--- a/src/exceptions.cpp
+++ b/src/exceptions.cpp
@@ -2,10 +2,10 @@
 
 // This is here for compatibility with older versions of Visual Studio
 // which don't support noexcept
-#ifdef _MSC_VER
-    #define YAML_CPP_NOEXCEPT _NOEXCEPT
-#else
+#if _MSC_VER >= 1900
     #define YAML_CPP_NOEXCEPT noexcept
+#else
+    #define YAML_CPP_NOEXCEPT _NOEXCEPT
 #endif
 
 namespace YAML {