GMP 0.3.0
Generative Metaprogramming library for C++
Loading...
Searching...
No Matches
macro.hpp File Reference
#include "platform.hpp"

Go to the source code of this file.

Macros

#define GMP_EXPAND(...)
 Force the full expansion of macro arguments.
 
#define GMP_IDENTITY(x)
 Identity macro that returns its argument unchanged, forcing expansion.
 
#define GMP_STRINGIFY(x)
 Convert a macro argument to a string literal.
 
#define GMP_CONCAT(lhs, rhs)
 Concatenates two tokens after expanding them.
 
#define GMP_GET_VARARGS(...)
 Get the number of variable arguments.
 
#define GMP_SIZE_OF_VAARGS(...)
 Get the size of variable arguments.
 
#define GMP_IS_EMPTY(...)
 Check if variable arguments are empty.
 
#define GMP_HAS_COMMA(...)
 Check if the variable argument list contains a comma.
 
#define GMP_OPT_COMMA(...)
 Optional comma based on argument emptiness.
 
#define GMP_OVERLOAD_INVOKE(call, ...)
 Call an overloaded macro based on the special version.
 
#define GMP_GET_N(idx, ...)
 Get the N-th parameter from the variable argument list.
 
#define GMP_GET_FIRST_N(n, ...)
 Get the first n arguments from a variadic argument list.
 
#define GMP_REMOVE_PARENS(tup)
 Remove parentheses from a tuple/parameter list.
 
#define GMP_GET_TUPLE(idx, tup)
 Get the nth element from a tuple/parameter list.
 
#define GMP_TUPLE_GET(idx, tup)
 Get the nth element from a tuple/parameter list.
 
#define GMP_IS_TUPLE(symbol)
 Tests whether a preprocessor argument is a non-empty tuple.
 
#define GMP_TUPLE_APPEND(tup, x)
 Append an element to the end of a tuple.
 
#define GMP_TUPLE_PREPEND(tup, x)
 Prepend an element to the beginning of a tuple.
 
#define GMP_TUPLE_CONCAT(tup_a, tup_b)
 Concatenate two tuples into a single tuple.
 
#define GMP_TUPLE_SIZE(tup)
 Calculate the number of elements in a tuple.
 
#define GMP_TUPLE_EMPTY(tup)
 Check if a tuple is empty.
 
#define GMP_TUPLE_SKIP(count, tup)
 Skip the first 'count' elements from a tuple and return the remaining elements.
 
#define GMP_TUPLE_TAKE(count, tup)
 Take the first 'count' elements from a tuple.
 
#define GMP_FOR_EACH(call, ...)
 Call a macro for each argument provided.
 
#define GMP_FOR_EACH_INDEPENDENT(call, ...)
 Executes a macro call on each argument independently, supporting nested iteration.
 
#define GMP_WHILE(pred, op, args)
 Repeatedly apply an operation while a predicate remains true.
 
#define GMP_CMP(x, y)
 Compare two numbers by simultaneous decrementing, return final state.
 
#define GMP_INC(value)
 Increment a value by 1.
 
#define GMP_DEC(value)
 Decrement a value by 1.
 
#define GMP_NOT(value)
 Macro to perform logical NOT operation on a value.
 
#define GMP_AND(a, b)
 Macro to perform logical AND operation between two values.
 
#define GMP_OR(a, b)
 Logical OR operation for two boolean values.
 
#define GMP_XOR(a, b)
 Logical XOR (exclusive OR) operation for two boolean values.
 
#define GMP_IMPLIES(p, q)
 Logical implication: p ⇒ q ≡ ¬p ∨ q.
 
#define GMP_BOOL(value)
 Macro to convert a value to a boolean representation.
 
#define GMP_MAX(a, b)
 Returns the maximum of two integer values.
 
#define GMP_MIN(a, b)
 Returns the minimum of two integer values.
 
#define GMP_MINMAX(a, b)
 Returns a tuple containing the minimum and maximum of two values in order.
 
#define GMP_MAXMIN(a, b)
 Returns a tuple containing the maximum and minimum of two values in order.
 
#define GMP_SWAP(a, b)
 Swaps the positions of two values.
 
#define GMP_ADD(a, b)
 Computes the sum of two integer values using iterative addition.
 
#define GMP_SUB(a, b)
 Computes the difference between two integer values (a - b).
 
#define GMP_IF_THEN_ELSE(cond, then_expr, else_expr)
 Conditional selection macro that evaluates to one of two expressions based on a condition.
 
#define GMP_IF(cond, expr)
 Conditional macro expansion based on boolean condition.
 
#define GMP_MAX_INDEX
 Maximum depth allowed for macro nesting.
 
#define GMP_CHECK_INDEX(index)
 Macro to check if an index is within a specified range.
 
#define GMP_CHECK_INDEX_BOOL(index)
 Macro to check if an index is within a specified range.
 
#define GMP_MAKE_INDEX_SEQUENCE(index)
 Generates a comma-separated index sequence up to a given index.
 
#define GMP_EQUAL_INT(i, j)
 Macro to compare two integer values for equality.
 
#define GMP_EQUAL_INT_INDEPENDENT(i, j)
 Compare two integer literal macros without relying on GMP_CMP.
 
#define GMP_LESS_INT(i, j)
 Check if i < j by analyzing comparison result state.
 
#define GMP_LESS_EQUAL_INT(i, j)
 Test if i ≤ j (i is less than or equal to j).
 
#define GMP_GREATER_INT(i, j)
 Check if i > j by analyzing comparison result state.
 
#define GMP_GREATER_EQUAL_INT(i, j)
 Test if i ≥ j (i is greater than or equal to j).
 
#define GMP_SUB_INT(i, j)
 Integer subtraction (i - j)
 
#define GMP_EMPTY(...)
 Macro that expands to nothing.
 
#define GMP_DEFER(id)
 Macro to defer the expansion of another macro.
 
#define GMP_EVAL(...)
 Repeatedly rescan macro output to force deeper recursive expansion.
 
#define GMP_EVAL_1(...)
 
#define GMP_EVAL_2(...)
 
#define GMP_EVAL_3(...)
 
#define GMP_EVAL_4(...)
 
#define GMP_EVAL_5(...)
 
#define GMP_EVAL_6(...)
 
#define GMP_RANGE(begin, end)
 Macro to generate a sequence of numbers from begin to end.
 
#define GMP_REPEAT(call, count, ...)
 Macro to repeat a function call a specified number of times.
 
#define GMP_GENERATE_NAMESPACES_BEGIN(...)
 Generate nested namespaces.
 
#define GMP_GENERATE_NAMESPACES_END(...)
 
#define GMP_CONCATS(x, y, ...)
 Concatenate multiple tokens into a single token.
 
#define GMP_REMOVE_TRAILING_COMMA(...)
 Removes trailing comma from variadic macro arguments.
 
#define GMP_IDENTIFIERS
 Expand to a comma-separated sequence of placeholder identifiers.
 
#define GMP_CPP_STD98
 Numeric __cplusplus value corresponding to C++98.
 
#define GMP_CPP_STD11
 Numeric __cplusplus value corresponding to C++11.
 
#define GMP_CPP_STD14
 Numeric __cplusplus value corresponding to C++14.
 
#define GMP_CPP_STD17
 Numeric __cplusplus value corresponding to C++17.
 
#define GMP_CPP_STD20
 Numeric __cplusplus value corresponding to C++20.
 
#define GMP_CPP_STD23
 Numeric __cplusplus value corresponding to C++23.
 
#define GMP_CPP_STD26
 Numeric __cplusplus value reserved for C++26 support checks.
 
#define GMP_CPP_AT_LEAST(version)
 Check if current C++ standard is greater than or equal to the specified version.
 
#define GMP_CPP_EXACTLY(version)
 Check if current C++ standard is exactly the specified version.
 
#define GMP_CPP_NEWER_THAN(version)
 Check if current C++ standard is newer than the specified version.
 
#define GMP_CPP_OLDER_THAN(version)
 Check if current C++ standard is older than the specified version.
 
#define GMP_INLINE
 Expand to inline when inline variables are supported, otherwise expand to nothing.