mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Define constexpr as /*constexpr*/ when unavailable (also noexcept)
This commit is contained in:
parent
5112ba02f6
commit
3aea9f7201
4
gsl/gsl
4
gsl/gsl
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
6
gsl/span
6
gsl/span
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user