mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix: unexpected tokens following preprocessor directive
This commit is contained in:
parent
ee04080e29
commit
013b2011a8
@ -183,13 +183,19 @@
|
||||
#endif
|
||||
|
||||
#if !defined(LIBIMP_ASSUME)
|
||||
# if defined(LIBIMP_CC_CLANG) && __has_builtin(__builtin_assume)
|
||||
# if defined(__has_builtin)
|
||||
# if __has_builtin(__builtin_assume)
|
||||
/// \see https://clang.llvm.org/docs/LanguageExtensions.html#langext-builtin-assume
|
||||
# define LIBIMP_ASSUME(...) __builtin_assume(__VA_ARGS__)
|
||||
# elif defined(LIBIMP_CC_GNUC) && __has_builtin(__builtin_unreachable)
|
||||
# elif __has_builtin(__builtin_unreachable)
|
||||
/// \see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005funreachable
|
||||
# define LIBIMP_ASSUME(...) do { if (!(__VA_ARGS__)) __builtin_unreachable(); } while (false)
|
||||
# elif defined(LIBIMP_CC_MSVC)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(LIBIMP_ASSUME)
|
||||
# if defined(LIBIMP_CC_MSVC)
|
||||
/// \see https://learn.microsoft.com/en-us/cpp/intrinsics/assume?view=msvc-140
|
||||
# define LIBIMP_ASSUME(...) __assume(__VA_ARGS__)
|
||||
# else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user