From 441a2ae9d502ea5a9ea7ee0850c0c45f8decfb22 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 19 Dec 2023 10:19:26 +0100 Subject: [PATCH] compat: add _Verify_ This eases porting of legacy code. Signed-off-by: Simon Rozman --- include/stdex/compat.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/stdex/compat.hpp b/include/stdex/compat.hpp index a408c94c0..0c9644228 100644 --- a/include/stdex/compat.hpp +++ b/include/stdex/compat.hpp @@ -197,8 +197,10 @@ size_t _countof(const T (&arr)[N]) #endif #ifdef NDEBUG #define _Assume_(p) _Analysis_assume_(p) +#define _Verify_(p) ((void)(p)) #else #define _Assume_(p) assert(p) +#define _Verify_(p) assert(p) #endif #ifdef __APPLE__