Define constexpr as /*constexpr*/ when unavailable (also noexcept)

This commit is contained in:
Martin Moene 2016-08-24 19:53:53 +02:00
parent 5112ba02f6
commit 3aea9f7201
6 changed files with 15 additions and 15 deletions

View File

@ -30,13 +30,13 @@
// No MSVC does constexpr fully yet // No MSVC does constexpr fully yet
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr #define constexpr /*constexpr*/
// MSVC 2013 workarounds // MSVC 2013 workarounds
#if _MSC_VER <= 1800 #if _MSC_VER <= 1800
// noexcept is not understood // noexcept is not understood
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept #define noexcept /*noexcept*/
// turn off some misguided warnings // turn off some misguided warnings
#pragma warning(push) #pragma warning(push)

View File

@ -26,11 +26,11 @@
// constexpr is not understood // constexpr is not understood
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr #define constexpr /*constexpr*/
// noexcept is not understood // noexcept is not understood
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept #define noexcept /*noexcept*/
#endif // _MSC_VER <= 1800 #endif // _MSC_VER <= 1800

View File

@ -29,7 +29,7 @@
// No MSVC does constexpr fully yet // No MSVC does constexpr fully yet
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr #define constexpr /*constexpr*/
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4127) // conditional expression is constant #pragma warning(disable : 4127) // conditional expression is constant
@ -38,7 +38,7 @@
#if _MSC_VER <= 1800 #if _MSC_VER <= 1800
// noexcept is not understood // noexcept is not understood
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept #define noexcept /*noexcept*/
// turn off some misguided warnings // turn off some misguided warnings
#pragma warning(push) #pragma warning(push)

View File

@ -44,7 +44,7 @@
// No MSVC does constexpr fully yet // No MSVC does constexpr fully yet
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr #define constexpr /*constexpr*/
// VS 2013 workarounds // VS 2013 workarounds
#if _MSC_VER <= 1800 #if _MSC_VER <= 1800
@ -55,7 +55,7 @@
// noexcept is not understood // noexcept is not understood
#ifndef GSL_THROW_ON_CONTRACT_VIOLATION #ifndef GSL_THROW_ON_CONTRACT_VIOLATION
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif #endif
// turn off some misguided warnings // turn off some misguided warnings
@ -73,7 +73,7 @@
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#endif #endif
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif // GSL_THROW_ON_CONTRACT_VIOLATION #endif // GSL_THROW_ON_CONTRACT_VIOLATION

View File

@ -44,7 +44,7 @@
// No MSVC does constexpr fully yet // No MSVC does constexpr fully yet
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr #define constexpr /*constexpr*/
// VS 2013 workarounds // VS 2013 workarounds
#if _MSC_VER <= 1800 #if _MSC_VER <= 1800
@ -56,7 +56,7 @@
// noexcept is not understood // noexcept is not understood
#ifndef GSL_THROW_ON_CONTRACT_VIOLATION #ifndef GSL_THROW_ON_CONTRACT_VIOLATION
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif #endif
#pragma push_macro("alignof") #pragma push_macro("alignof")
@ -77,7 +77,7 @@
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#endif #endif
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif // GSL_THROW_ON_CONTRACT_VIOLATION #endif // GSL_THROW_ON_CONTRACT_VIOLATION

View File

@ -30,7 +30,7 @@
// No MSVC does constexpr fully yet // No MSVC does constexpr fully yet
#pragma push_macro("constexpr") #pragma push_macro("constexpr")
#define constexpr /* nothing */ #define constexpr /*constexpr*/
#pragma warning(push) #pragma warning(push)
@ -50,7 +50,7 @@
// noexcept is not understood // noexcept is not understood
#ifndef GSL_THROW_ON_CONTRACT_VIOLATION #ifndef GSL_THROW_ON_CONTRACT_VIOLATION
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif #endif
#endif // _MSC_VER <= 1800 #endif // _MSC_VER <= 1800
@ -67,7 +67,7 @@
#pragma push_macro("noexcept") #pragma push_macro("noexcept")
#endif #endif
#define noexcept /* nothing */ #define noexcept /*noexcept*/
#endif // GSL_THROW_ON_CONTRACT_VIOLATION #endif // GSL_THROW_ON_CONTRACT_VIOLATION