27 #ifndef INCLUDED_CODE_ANNOTATION 28 #define INCLUDED_CODE_ANNOTATION 49 #if HAVE_C99 && GCC_VERSION // _Pragma from C99, unused from GCC 50 # define UNUSED2(param) _Pragma("unused " #param) 54 # define UNUSED2(param) do{ if(¶m) {} } while(false) 56 # define UNUSED2(param) ((void)(param)) 81 # define NOTHROW_DECLARE __attribute__((nothrow)) 82 # define NOTHROW_DEFINE // not supported for definitions 84 # define NOTHROW_DECLARE __attribute__((nothrow)) 85 # define NOTHROW_DEFINE // not supported for definitions 90 # define NOTHROW_DECLARE __declspec(nothrow) 91 # define NOTHROW_DEFINE __declspec(nothrow) 95 # define NOTHROW_DECLARE 96 # define NOTHROW_DEFINE 104 #if __has_feature(attribute_analyzer_noreturn) 105 # define ANALYZER_NORETURN __attribute__((analyzer_noreturn)) 107 # define ANALYZER_NORETURN 136 #define UNREACHABLE // actually defined below.. this is for 137 # undef UNREACHABLE // CppDoc's benefit only. 142 #define HAVE_ASSUME_UNREACHABLE 1 143 #if MSC_VERSION && !ICC_VERSION // (ICC ignores this) 144 # define ASSUME_UNREACHABLE __assume(0) 146 # define ASSUME_UNREACHABLE __builtin_unreachable() 148 # define ASSUME_UNREACHABLE 149 # undef HAVE_ASSUME_UNREACHABLE 150 # define HAVE_ASSUME_UNREACHABLE 0 156 #if HAVE_ASSUME_UNREACHABLE && !CONFIG_ENABLE_CHECKS 157 # define UNREACHABLE ASSUME_UNREACHABLE 163 # define UNREACHABLE\ 165 DEBUG_WARN_ERR(ERR::LOGIC); \ 181 #define NODEFAULT default: UNREACHABLE 189 #define PASTE3_HIDDEN__(a, b, c) a ## b ## c 190 #define PASTE3__(a, b, c) PASTE3_HIDDEN__(a, b, c) 191 #define UID__ PASTE3__(LINE_, __LINE__, _) 192 #define UID2__ PASTE3__(LINE_, __LINE__, _2) 207 #define cassert(expr) static_assert((expr), #expr) 227 #define NONCOPYABLE(className) \ 228 className(const className&) = delete; \ 229 className& operator=(const className&) = delete 235 #define MOVABLE(className) \ 236 className(className&&) = default; \ 237 className& operator=(className&&) = default 240 # define ASSUME_ALIGNED(ptr, multiple) __assume_aligned(ptr, multiple) 242 # define ASSUME_ALIGNED(ptr, multiple) 250 # define PRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, fmtpos+1))) 251 # define VPRINTF_ARGS(fmtpos) __attribute__ ((format (printf, fmtpos, 0))) 252 # define WPRINTF_ARGS(fmtpos) 253 # define VWPRINTF_ARGS(fmtpos) 255 # define PRINTF_ARGS(fmtpos) 256 # define VPRINTF_ARGS(fmtpos) 257 # define WPRINTF_ARGS(fmtpos) 258 # define VWPRINTF_ARGS(fmtpos) 264 # define SENTINEL_ARG __attribute__ ((sentinel)) 266 # define SENTINEL_ARG 273 # define COMPILER_FENCE __memory_barrier() 276 # pragma intrinsic(_ReadWriteBarrier) 277 # define COMPILER_FENCE _ReadWriteBarrier() 279 # define COMPILER_FENCE asm volatile("" : : : "memory") 281 # define COMPILER_FENCE 291 # define _W64 __attribute__((mode (__pointer__))) 319 # define RESTRICT __restrict__ 322 # define RESTRICT __restrict 329 # error ICC_VERSION defined without either GCC_VERSION or an adequate MSC_VERSION 348 #define ARRAY_SIZE(name) (sizeof(*ArraySizeDeducer(name))) 357 # define __func__ __FUNCTION__ 360 # define __func__ "(unknown)" 365 #if defined(__cplusplus) 366 # define EXTERN_C extern "C" 368 # define EXTERN_C extern 373 # define INLINE __forceinline 375 # define INLINE inline 380 # define CALL_CONV __cdecl 386 #if MSC_VERSION && !ARCH_AMD64 387 # define DECORATED_NAME(name) _##name 389 # define DECORATED_NAME(name) name 395 #define STRINGIZE2(id) # id 396 #define STRINGIZE(id) STRINGIZE2(id) 401 #define WIDEN2(x) L ## x 402 #define WIDEN(x) WIDEN2(x) 405 #if __has_cpp_attribute(fallthrough) || defined(__cplusplus) && __cplusplus >= 201703L 406 # define FALLTHROUGH [[fallthrough]] 407 #elif __has_cpp_attribute(gnu::fallthrough) 408 # define FALLTHROUGH [[gnu::fallthrough]] 409 #elif __has_cpp_attribute(clang::fallthrough) 410 # define FALLTHROUGH [[clang::fallthrough]] 416 #endif // #ifndef INCLUDED_CODE_ANNOTATION
void ignore_result(const T &)
Silence the 'unused result' warning.
Definition: code_annotation.h:65
#define T(string_literal)
Definition: secure_crt.cpp:77
char(* ArraySizeDeducer(T(&)[n]))[n]