Added noexcept work around for VS 2013.

noexcept is support only starting VS 2015
This commit is contained in:
vjacquet 2016-06-27 05:45:15 +02:00
parent f4341ad1b8
commit a850108461

View File

@ -22,6 +22,18 @@
#include <exception>
#include <stdexcept>
#ifdef _MSC_VER
// MSVC 2013 workarounds
#if _MSC_VER <= 1800
// noexcept is not understood
#pragma push_macro("noexcept")
#define noexcept
#endif // _MSC_VER <= 1800
#endif // _MSC_VER
//
// There are three configuration options for this GSL implementation's behavior
// when pre/post conditions on the GSL types are violated:
@ -87,4 +99,16 @@ namespace details
#endif
#ifdef _MSC_VER
#if _MSC_VER <= 1800
#undef noexcept
#pragma pop_macro("noexcept")
#endif // _MSC_VER <= 1800
#endif // _MSC_VER
#endif // GSL_CONTRACTS_H