P99
|
preprocessor conditionals to use inside macros More...
#include "p99_logical.h"
Go to the source code of this file.
Macros | |
#define | p99_has_attribute(X) (P99_IF_EQ_1(__has_attribute(X))(1)(0) || P99_IF_EQ_1(p00_has_attribute_ ## X)(1)(0)) |
#define | p99_has_builtin(X) (P99_IF_EQ_1(__has_builtin(X))(1)(0) || P99_IF_EQ_1(p00_has_builtin_ ## X)(1)(0)) |
#define | p99_has_extension(X) (P99_IF_EQ_1(__has_extension(X))(1)(0) || P99_IF_EQ_1(p00_has_extension_ ## X)(1)(0)) |
#define | p99_has_feature(X) (P99_IF_EQ_1(__has_feature(X))(1)(0) || P99_IF_EQ_1(p00_has_feature_ ## X)(1)(0)) |
#define | P99_IF_ELSE(...) P99_IF_EQ_0(P99_IS_EQ_0(__VA_ARGS__)) |
A preprocessor control structure. More... | |
#define | P99_IF_EMPTY(...) P99_IF_EQ_1(P99_IS_EMPTY(__VA_ARGS__)) |
#define | P99_IF_EQ(A, B) P00_IF_CLAUSE(P99_PASTE4(P00_IS_,A,_EQ_,B)()) |
Test if two words A and B are equal. More... | |
#define | P99_IF_EQ_0(N) P99_IF_EQ(0, N) |
Test if token N is the token 0. More... | |
#define | P99_IF_EQ_1(N) P99_IF_EQ(1, N) |
Test if token N is the token 1. More... | |
#define | P99_IF_EQ_2(N) P99_IF_EQ(2, N) |
Test if token N is the token 2. More... | |
#define | P99_IF_EQ_3(N) P99_IF_EQ(3, N) |
Test if token N is the token 3. More... | |
#define | P99_IF_EQ_4(N) P99_IF_EQ(4, N) |
Test if token N is the token 4. More... | |
#define | P99_IF_GE(A, B) P99_IF_EQ_1(P99_IS_GE(A, B)) |
Test two decimal numbers A and B for whether A is greater than or equal to B. More... | |
#define | P99_IF_GE_0(A) P00_IF_CLAUSE(P99_PASTE4(P00_IS_,A,_GE_,0)()) |
#define | P99_IF_GT(A, B) P99_IF_EQ_1(P99_IS_GT(A, B)) |
Test two decimal numbers A and B for whether A is strictly greater than B. More... | |
#define | P99_IF_LE(A, B) P99_IF_EQ_1(P99_IS_LE(A, B)) |
Test two decimal numbers A and B for whether A is less than or equal to B. More... | |
#define | P99_IF_LT(A, B) P99_IF_EQ_1(P99_IS_LT(A, B)) |
Test two decimal numbers A and B for whether A is strictly less than B. More... | |
#define | P99_IF_LT_0(A) P00_IF_NOT_CLAUSE(P99_PASTE4(P00_IS_,A,_GE_,0)()) |
#define | P99_IF_NE(A, B) P00_IF_NOT_CLAUSE(P99_PASTE4(P00_IS_,A,_EQ_,B)()) |
Test if two words A and B are unequal. More... | |
#define | P99_IF_void(...) P99_IF_EQ_1(P99_IS_EQ_void(__VA_ARGS__)) |
#define | P99_IF_VOID(...) P99_IF_EQ_1(P99_IS_VOID(__VA_ARGS__)) |
#define | P99_PRAGMA(...) P99_IF_EMPTY(__VA_ARGS__)()(P00_PRAGMA(__VA_ARGS__)) |
An wrapper of the _Pragma keyword. More... | |
preprocessor conditionals to use inside macros
Definition in file p99_if.h.