Skip to content

Commit 0f9a586

Browse files
alexkaratarakisjbeder
authored andcommitted
Fix _NOEXCEPT not available in VS2017 15.8. Use noexcept for VS2015+ (#597)
1 parent 4fb1c4b commit 0f9a586

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/yaml-cpp/exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// This is here for compatibility with older versions of Visual Studio
1717
// which don't support noexcept
18-
#ifdef _MSC_VER
18+
#if defined(_MSC_VER) && _MSC_VER < 1900
1919
#define YAML_CPP_NOEXCEPT _NOEXCEPT
2020
#else
2121
#define YAML_CPP_NOEXCEPT noexcept

src/exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// This is here for compatibility with older versions of Visual Studio
44
// which don't support noexcept
5-
#ifdef _MSC_VER
5+
#if defined(_MSC_VER) && _MSC_VER < 1900
66
#define YAML_CPP_NOEXCEPT _NOEXCEPT
77
#else
88
#define YAML_CPP_NOEXCEPT noexcept

0 commit comments

Comments
 (0)