From e7e7b6f2d2cb2063789272fcb3b57f463175014b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 15 Jun 2018 14:53:00 -0700 Subject: [PATCH] Fix _NOEXCEPT not available in VS2017 15.8. Use noexcept for VS2015+ --- 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 9c96859b2..87b92f5e9 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 9b6d8912c..841549e0d 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