Move the YAML_CPP_NOEXCEPT macro to include/yaml-cpp/noexcept.h (#813)

This is in preparation for other patches that will make use of the
macro. The patch also removes #undef:ing the macro after its been
used to not make the header inclusion order critical. Otherwise,
the new header would always have to be the last of the yaml-cpp
headers to be included.
This commit is contained in:
Ted Lyngmo
2020-02-04 20:24:37 +01:00
committed by GitHub
parent c9460110e0
commit 1928bca4a4
3 changed files with 20 additions and 22 deletions

View File

@@ -1,12 +1,5 @@
#include "yaml-cpp/exceptions.h"
// This is here for compatibility with older versions of Visual Studio
// which don't support noexcept
#if defined(_MSC_VER) && _MSC_VER < 1900
#define YAML_CPP_NOEXCEPT _NOEXCEPT
#else
#define YAML_CPP_NOEXCEPT noexcept
#endif
#include "yaml-cpp/noexcept.h"
namespace YAML {
@@ -25,7 +18,3 @@ BadInsert::~BadInsert() YAML_CPP_NOEXCEPT = default;
EmitterException::~EmitterException() YAML_CPP_NOEXCEPT = default;
BadFile::~BadFile() YAML_CPP_NOEXCEPT = default;
}
#undef YAML_CPP_NOEXCEPT