From 0f9a586ca1dc29c2ecb8dd715a315b93e3f40f79 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis <alex@karatarakis.com> Date: Sat, 30 Jun 2018 14:23:28 -0700 Subject: [PATCH] Fix _NOEXCEPT not available in VS2017 15.8. Use noexcept for VS2015+ (#597) --- include/yaml-cpp/exceptions.h | 2 +- src/exceptions.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h index 9c96859..87b92f5 100644 --- a/include/yaml-cpp/exceptions.h +++ b/include/yaml-cpp/exceptions.h @@ -15,7 +15,7 @@ // This is here for compatibility with older versions of Visual Studio // which don't support noexcept -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 #define YAML_CPP_NOEXCEPT _NOEXCEPT #else #define YAML_CPP_NOEXCEPT noexcept diff --git a/src/exceptions.cpp b/src/exceptions.cpp index 9b6d891..841549e 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp @@ -2,7 +2,7 @@ // This is here for compatibility with older versions of Visual Studio // which don't support noexcept -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 #define YAML_CPP_NOEXCEPT _NOEXCEPT #else #define YAML_CPP_NOEXCEPT noexcept -- GitLab