|
libzypp 17.38.6
|
Always-on precondition checking for NG code. More...
#include <zypp-core/base/LogTools.h>

Go to the source code of this file.
Namespaces | |
| namespace | zyppng |
| namespace | zyppng::detail |
Macros | |
| #define | ZYPP_DETAIL_UNLIKELY |
| In C++20 and later the violation branch is marked [[unlikely]], giving the optimiser a free hint that it is never expected to be taken. | |
| #define | ZYPP_PRECONDITION(EXPR, ...) |
| Always-on precondition check — fires in debug AND release builds. | |
Functions | |
| void | zyppng::detail::preconditionViolated (const char *file, int line, const char *func, const char *expr, const char *msg) |
Always-on precondition checking for NG code.
This header is intentionally NOT installed as public API. It is private to the zyppng implementation layer.
Definition in file precondition.h.
| #define ZYPP_DETAIL_UNLIKELY |
In C++20 and later the violation branch is marked [[unlikely]], giving the optimiser a free hint that it is never expected to be taken.
In C++17 the attribute is omitted — the macro is otherwise identical.
Definition at line 27 of file precondition.h.
| #define ZYPP_PRECONDITION | ( | EXPR, | |
| ... ) |
Always-on precondition check — fires in debug AND release builds.
On violation: logs file / line / function / expression to the INT (internal error) log channel, then calls std::terminate(). The failure is not recoverable and must never be caught.
An optional human-readable message may follow the expression:
Definition at line 42 of file precondition.h.