#include "juce_TargetPlatform.h"
Macros | |
#define | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...) JUCE_PUSH_WARNINGS_GCC_LIKE(GCC, __VA_ARGS__) |
Push/pop warnings on compilers with gcc-like warning flags. More... | |
#define | JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC(level, warnings) |
#define | JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings) |
#define | JUCE_BEGIN_NO_SANITIZE(warnings) |
Disable sanitizers for a range of functions. More... | |
#define | JUCE_CONCAT(a, b) JUCE_CONCAT_(a, b) |
#define | JUCE_CONCAT_(a, b) a##b |
Concatenate two tokens to form a new token. More... | |
#define | JUCE_EACH(FN, ...) |
Apply the macro FN to each of the other arguments. More... | |
#define | JUCE_EACH_00_(FN) |
#define | JUCE_EACH_01_(FN, X) FN(X) |
#define | JUCE_EACH_02_(FN, X, ...) FN(X) JUCE_EACH_01_(FN, __VA_ARGS__) |
#define | JUCE_EACH_03_(FN, X, ...) FN(X) JUCE_EACH_02_(FN, __VA_ARGS__) |
#define | JUCE_EACH_04_(FN, X, ...) FN(X) JUCE_EACH_03_(FN, __VA_ARGS__) |
#define | JUCE_EACH_05_(FN, X, ...) FN(X) JUCE_EACH_04_(FN, __VA_ARGS__) |
#define | JUCE_EACH_06_(FN, X, ...) FN(X) JUCE_EACH_05_(FN, __VA_ARGS__) |
#define | JUCE_EACH_07_(FN, X, ...) FN(X) JUCE_EACH_06_(FN, __VA_ARGS__) |
#define | JUCE_EACH_08_(FN, X, ...) FN(X) JUCE_EACH_07_(FN, __VA_ARGS__) |
#define | JUCE_EACH_09_(FN, X, ...) FN(X) JUCE_EACH_08_(FN, __VA_ARGS__) |
#define | JUCE_EACH_10_(FN, X, ...) FN(X) JUCE_EACH_09_(FN, __VA_ARGS__) |
#define | JUCE_EACH_11_(FN, X, ...) FN(X) JUCE_EACH_10_(FN, __VA_ARGS__) |
#define | JUCE_EACH_12_(FN, X, ...) FN(X) JUCE_EACH_11_(FN, __VA_ARGS__) |
#define | JUCE_EACH_13_(FN, X, ...) FN(X) JUCE_EACH_12_(FN, __VA_ARGS__) |
#define | JUCE_EACH_14_(FN, X, ...) FN(X) JUCE_EACH_13_(FN, __VA_ARGS__) |
#define | JUCE_EACH_15_(FN, X, ...) FN(X) JUCE_EACH_14_(FN, __VA_ARGS__) |
#define | JUCE_EACH_16_(FN, X, ...) FN(X) JUCE_EACH_15_(FN, __VA_ARGS__) |
#define | JUCE_EACH_17_(FN, X, ...) FN(X) JUCE_EACH_16_(FN, __VA_ARGS__) |
#define | JUCE_EACH_18_(FN, X, ...) FN(X) JUCE_EACH_17_(FN, __VA_ARGS__) |
#define | JUCE_EACH_19_(FN, X, ...) FN(X) JUCE_EACH_18_(FN, __VA_ARGS__) |
#define | JUCE_EACH_20_(FN, X, ...) FN(X) JUCE_EACH_19_(FN, __VA_ARGS__) |
#define | JUCE_EACH_21_(FN, X, ...) FN(X) JUCE_EACH_20_(FN, __VA_ARGS__) |
#define | JUCE_EACH_22_(FN, X, ...) FN(X) JUCE_EACH_21_(FN, __VA_ARGS__) |
#define | JUCE_EACH_23_(FN, X, ...) FN(X) JUCE_EACH_22_(FN, __VA_ARGS__) |
#define | JUCE_EACH_24_(FN, X, ...) FN(X) JUCE_EACH_23_(FN, __VA_ARGS__) |
#define | JUCE_EACH_25_(FN, X, ...) FN(X) JUCE_EACH_24_(FN, __VA_ARGS__) |
#define | JUCE_EACH_26_(FN, X, ...) FN(X) JUCE_EACH_25_(FN, __VA_ARGS__) |
#define | JUCE_EACH_27_(FN, X, ...) FN(X) JUCE_EACH_26_(FN, __VA_ARGS__) |
#define | JUCE_EACH_28_(FN, X, ...) FN(X) JUCE_EACH_27_(FN, __VA_ARGS__) |
#define | JUCE_EACH_29_(FN, X, ...) FN(X) JUCE_EACH_28_(FN, __VA_ARGS__) |
#define | JUCE_EACH_30_(FN, X, ...) FN(X) JUCE_EACH_29_(FN, __VA_ARGS__) |
#define | JUCE_EACH_31_(FN, X, ...) FN(X) JUCE_EACH_30_(FN, __VA_ARGS__) |
#define | JUCE_EACH_32_(FN, X, ...) FN(X) JUCE_EACH_31_(FN, __VA_ARGS__) |
#define | JUCE_EACH_33_(FN, X, ...) FN(X) JUCE_EACH_32_(FN, __VA_ARGS__) |
#define | JUCE_EACH_34_(FN, X, ...) FN(X) JUCE_EACH_33_(FN, __VA_ARGS__) |
#define | JUCE_EACH_35_(FN, X, ...) FN(X) JUCE_EACH_34_(FN, __VA_ARGS__) |
#define | JUCE_EACH_36_(FN, X, ...) FN(X) JUCE_EACH_35_(FN, __VA_ARGS__) |
#define | JUCE_EACH_37_(FN, X, ...) FN(X) JUCE_EACH_36_(FN, __VA_ARGS__) |
#define | JUCE_EACH_38_(FN, X, ...) FN(X) JUCE_EACH_37_(FN, __VA_ARGS__) |
#define | JUCE_EACH_39_(FN, X, ...) FN(X) JUCE_EACH_38_(FN, __VA_ARGS__) |
#define | JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_POP_WARNINGS_GCC_LIKE(GCC) |
#define | JUCE_END_IGNORE_WARNINGS_MSVC |
#define | JUCE_END_NO_SANITIZE |
#define | JUCE_IGNORE_clang(warning) JUCE_IGNORE_GCC_LIKE(clang, warning) |
#define | JUCE_IGNORE_GCC(warning) JUCE_IGNORE_GCC_LIKE(GCC, warning) |
Ignore GCC/clang-specific warnings. More... | |
#define | JUCE_IGNORE_GCC_IMPL_(compiler, warning) |
#define | JUCE_IGNORE_GCC_IMPL_0(compiler, warning) |
#define | JUCE_IGNORE_GCC_IMPL_1(compiler, warning) _Pragma(JUCE_TO_STRING(compiler diagnostic ignored warning)) |
#define | JUCE_IGNORE_GCC_LIKE(compiler, warning) JUCE_IGNORE_GCC_IMPL_1(compiler, warning) |
If 'warning' is recognised by this compiler, ignore it. More... | |
#define | JUCE_IGNORE_MSVC(warnings) |
Push/pop warnings on MSVC. More... | |
#define | JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, ...) |
#define | JUCE_NTH_ARG_(_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, N, ...) N |
Return the Nth argument. More... | |
#define | JUCE_POP_WARNINGS_GCC_LIKE(compiler) _Pragma(JUCE_TO_STRING(compiler diagnostic pop)) |
Pop the current warning scope. More... | |
#define | JUCE_PUSH_WARNINGS_GCC_LIKE(compiler, ...) JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, "-Wpragmas", __VA_ARGS__) |
Push a new warning scope, and then ignore each warning for either clang or gcc. More... | |
#define | JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION 11 |
#define | JUCE_TO_STRING(x) #x |
Quote the argument, turning it into a string. More... | |
#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE | ( | ... | ) | JUCE_PUSH_WARNINGS_GCC_LIKE(GCC, __VA_ARGS__) |
Push/pop warnings on compilers with gcc-like warning flags.
These macros expand to nothing on other compilers (like MSVC).
#define JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC | ( | level, | |
warnings | |||
) |
#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC | ( | warnings | ) |
#define JUCE_BEGIN_NO_SANITIZE | ( | warnings | ) |
Disable sanitizers for a range of functions.
This functionality doesn't seem to exist on GCC yet, so at the moment this only works for clang.
#define JUCE_CONCAT | ( | a, | |
b | |||
) | JUCE_CONCAT_(a, b) |
#define JUCE_CONCAT_ | ( | a, | |
b | |||
) | a##b |
Concatenate two tokens to form a new token.
#define JUCE_EACH | ( | FN, | |
... | |||
) |
Apply the macro FN to each of the other arguments.
#define JUCE_EACH_00_ | ( | FN | ) |
#define JUCE_EACH_02_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_01_(FN, __VA_ARGS__) |
#define JUCE_EACH_03_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_02_(FN, __VA_ARGS__) |
#define JUCE_EACH_04_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_03_(FN, __VA_ARGS__) |
#define JUCE_EACH_05_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_04_(FN, __VA_ARGS__) |
#define JUCE_EACH_06_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_05_(FN, __VA_ARGS__) |
#define JUCE_EACH_07_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_06_(FN, __VA_ARGS__) |
#define JUCE_EACH_08_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_07_(FN, __VA_ARGS__) |
#define JUCE_EACH_09_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_08_(FN, __VA_ARGS__) |
#define JUCE_EACH_10_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_09_(FN, __VA_ARGS__) |
#define JUCE_EACH_11_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_10_(FN, __VA_ARGS__) |
#define JUCE_EACH_12_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_11_(FN, __VA_ARGS__) |
#define JUCE_EACH_13_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_12_(FN, __VA_ARGS__) |
#define JUCE_EACH_14_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_13_(FN, __VA_ARGS__) |
#define JUCE_EACH_15_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_14_(FN, __VA_ARGS__) |
#define JUCE_EACH_16_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_15_(FN, __VA_ARGS__) |
#define JUCE_EACH_17_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_16_(FN, __VA_ARGS__) |
#define JUCE_EACH_18_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_17_(FN, __VA_ARGS__) |
#define JUCE_EACH_19_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_18_(FN, __VA_ARGS__) |
#define JUCE_EACH_20_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_19_(FN, __VA_ARGS__) |
#define JUCE_EACH_21_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_20_(FN, __VA_ARGS__) |
#define JUCE_EACH_22_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_21_(FN, __VA_ARGS__) |
#define JUCE_EACH_23_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_22_(FN, __VA_ARGS__) |
#define JUCE_EACH_24_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_23_(FN, __VA_ARGS__) |
#define JUCE_EACH_25_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_24_(FN, __VA_ARGS__) |
#define JUCE_EACH_26_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_25_(FN, __VA_ARGS__) |
#define JUCE_EACH_27_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_26_(FN, __VA_ARGS__) |
#define JUCE_EACH_28_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_27_(FN, __VA_ARGS__) |
#define JUCE_EACH_29_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_28_(FN, __VA_ARGS__) |
#define JUCE_EACH_30_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_29_(FN, __VA_ARGS__) |
#define JUCE_EACH_31_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_30_(FN, __VA_ARGS__) |
#define JUCE_EACH_32_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_31_(FN, __VA_ARGS__) |
#define JUCE_EACH_33_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_32_(FN, __VA_ARGS__) |
#define JUCE_EACH_34_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_33_(FN, __VA_ARGS__) |
#define JUCE_EACH_35_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_34_(FN, __VA_ARGS__) |
#define JUCE_EACH_36_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_35_(FN, __VA_ARGS__) |
#define JUCE_EACH_37_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_36_(FN, __VA_ARGS__) |
#define JUCE_EACH_38_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_37_(FN, __VA_ARGS__) |
#define JUCE_EACH_39_ | ( | FN, | |
X, | |||
... | |||
) | FN(X) JUCE_EACH_38_(FN, __VA_ARGS__) |
#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE JUCE_POP_WARNINGS_GCC_LIKE(GCC) |
#define JUCE_END_IGNORE_WARNINGS_MSVC |
#define JUCE_END_NO_SANITIZE |
#define JUCE_IGNORE_clang | ( | warning | ) | JUCE_IGNORE_GCC_LIKE(clang, warning) |
#define JUCE_IGNORE_GCC | ( | warning | ) | JUCE_IGNORE_GCC_LIKE(GCC, warning) |
Ignore GCC/clang-specific warnings.
#define JUCE_IGNORE_GCC_IMPL_ | ( | compiler, | |
warning | |||
) |
#define JUCE_IGNORE_GCC_IMPL_0 | ( | compiler, | |
warning | |||
) |
#define JUCE_IGNORE_GCC_IMPL_1 | ( | compiler, | |
warning | |||
) | _Pragma(JUCE_TO_STRING(compiler diagnostic ignored warning)) |
#define JUCE_IGNORE_GCC_LIKE | ( | compiler, | |
warning | |||
) | JUCE_IGNORE_GCC_IMPL_1(compiler, warning) |
If 'warning' is recognised by this compiler, ignore it.
#define JUCE_IGNORE_MSVC | ( | warnings | ) |
Push/pop warnings on MSVC.
These macros expand to nothing on other compilers (like clang and gcc).
#define JUCE_IGNORE_WARNINGS_GCC_LIKE | ( | compiler, | |
... | |||
) |
#define JUCE_NTH_ARG_ | ( | _00, | |
_01, | |||
_02, | |||
_03, | |||
_04, | |||
_05, | |||
_06, | |||
_07, | |||
_08, | |||
_09, | |||
_10, | |||
_11, | |||
_12, | |||
_13, | |||
_14, | |||
_15, | |||
_16, | |||
_17, | |||
_18, | |||
_19, | |||
_20, | |||
_21, | |||
_22, | |||
_23, | |||
_24, | |||
_25, | |||
_26, | |||
_27, | |||
_28, | |||
_29, | |||
_30, | |||
_31, | |||
_32, | |||
_33, | |||
_34, | |||
_35, | |||
_36, | |||
_37, | |||
_38, | |||
_39, | |||
N, | |||
... | |||
) | N |
Return the Nth argument.
By passing a variadic pack followed by N other parameters, we can select one of those N parameter based on the length of the parameter pack.
#define JUCE_POP_WARNINGS_GCC_LIKE | ( | compiler | ) | _Pragma(JUCE_TO_STRING(compiler diagnostic pop)) |
Pop the current warning scope.
#define JUCE_PUSH_WARNINGS_GCC_LIKE | ( | compiler, | |
... | |||
) | JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, "-Wpragmas", __VA_ARGS__) |
Push a new warning scope, and then ignore each warning for either clang or gcc.
If the compiler doesn't support __has_warning, we add -Wpragmas as the first disabled warning because otherwise we might get complaints about unknown warning options.
#define JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION 11 |
#define JUCE_TO_STRING | ( | x | ) | #x |
Quote the argument, turning it into a string.