mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Changed default to per-TU violation handlers
And removed the feature test macro to instead tgest for a specific C++ version.
This commit is contained in:
parent
81c10b8017
commit
882720bd73
@ -117,7 +117,10 @@ private:
|
|||||||
handler chandler;
|
handler chandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined GSL_PER_CPP_CONTRACT_VIOLATION && defined __cpp_inline_variables
|
// By default, there is one violation handler per translation unit.
|
||||||
|
// Defining GSL_GLOBAL_CONTRACT_VIOLATION_HANDLERS and compiling as
|
||||||
|
// C++17 (or later) opts into using a global violation handler.
|
||||||
|
#if defined GSL_GLOBAL_CONTRACT_VIOLATION_HANDLERS && __cplusplus >= 201703L
|
||||||
#define GSL_CONTRACT_VIOLATION_GRANULARITY inline
|
#define GSL_CONTRACT_VIOLATION_GRANULARITY inline
|
||||||
#else
|
#else
|
||||||
#define GSL_CONTRACT_VIOLATION_GRANULARITY static
|
#define GSL_CONTRACT_VIOLATION_GRANULARITY static
|
||||||
|
Loading…
Reference in New Issue
Block a user