Added basic compile support for MSVC 2013 to byte.

This commit is contained in:
Neil MacIntosh
2016-07-15 17:31:40 -07:00
parent 267472449c
commit 8855c59579
3 changed files with 42 additions and 0 deletions
+32
View File
@@ -19,6 +19,23 @@
#ifndef GSL_BYTE_H
#define GSL_BYTE_H
#ifdef _MSC_VER
// MSVC 2013 workarounds
#if _MSC_VER <= 1800
// constexpr is not understood
#pragma push_macro("constexpr")
#define constexpr
// noexcept is not understood
#pragma push_macro("noexcept")
#define noexcept
#endif // _MSC_VER <= 1800
#endif // _MSC_VER
namespace gsl
{
// This is a simple definition for now that allows
@@ -68,4 +85,19 @@ namespace gsl
} // namespace gsl
#ifdef _MSC_VER
#if _MSC_VER <= 1800
#undef constexpr
#pragma pop_macro("constexpr")
#undef noexcept
#pragma pop_macro("noexcept")
#endif // _MSC_VER <= 1800
#endif // _MSC_VER
#endif // GSL_BYTE_H