ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
|
General purpose macros. More...
Go to the source code of this file.
Macros | |
#define | PEPTIDE_END_MACRO static_assert(true, "") |
Helper macro to force the use of a semi-colon at the end of macro invocation. More... | |
#define | PEPTIDE_IDENTITY(X) X |
The identity macro. More... | |
#define | PEPTIDE_UNREACHABLE(MSG) assert(false && MSG) |
Macro indicating that the code path is unreachable. More... | |
#define | PEPTIDE_DEPRECATED(REASON) [[deprecated(REASON)]] |
Macro indicating that a declaration is deprecated. More... | |
#define | PEPTIDE_VERIFY(EXPR) assert(EXPR) |
Helper macro to verify the validity of an expression. More... | |
General purpose macros.
Definition in file CfgUtilsMacros.h.
#define PEPTIDE_DEPRECATED | ( | REASON | ) | [[deprecated(REASON)]] |
Macro indicating that a declaration is deprecated.
The macro can be used to indicate that a declaration is deprecated and shouldn't be used anymore in new code. The deprecated declaration could be a function or a class, for example. The macro also allows one to provide an explanation concerning the deprecation.
For example:
Definition at line 98 of file CfgUtilsMacros.h.
#define PEPTIDE_END_MACRO static_assert(true, "") |
Helper macro to force the use of a semi-colon at the end of macro invocation.
It will work for declaration areas as well, so it can be used when defining macros for creating methods, functions, etc.
Definition at line 27 of file CfgUtilsMacros.h.
#define PEPTIDE_IDENTITY | ( | X | ) | X |
The identity macro.
For example, it can be used for silencing clang-tidy misc-macro-parentheses warnings!
Definition at line 33 of file CfgUtilsMacros.h.
#define PEPTIDE_UNREACHABLE | ( | MSG | ) | assert(false && MSG) |
Macro indicating that the code path is unreachable.
Macro indicating that the code path is unreachable. The code path might be unreachable for various reasons: class invariants, all cases covered by a switch statement, etc...
In debug builds, an assertion is raised if the macro is ever executed. In optimized builds, an intrinsic is used to tell the optimizer that the code path can be entirely pruned out. That often leads to significantly more efficient code being generated.
Definition at line 63 of file CfgUtilsMacros.h.
#define PEPTIDE_VERIFY | ( | EXPR | ) | assert(EXPR) |
Helper macro to verify the validity of an expression.
The expression EXPR
is evaluated regardless of whether assertions are enabled or not. But when assertions are enabled, it asserts that EXPR
is true.
Definition at line 106 of file CfgUtilsMacros.h.