CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
anonymous_namespace{debug.hh}::ConditionalDebug< Threshold, Context, EnableAssertions, VerboseInvariants >::Invariant< Args > Struct Template Reference

Function-like class for invariants that is expected to be used via the deduction guide as: More...

#include <debug.hh>

Public Member Functions

 Invariant (bool condition, const char *fmt, Args... args, SourceLocation loc=SourceLocation::current())
 Constructor, performs the invariant check.

Detailed Description

template<DebugLevelTemplateArgument Threshold, DebugContext Context, bool EnableAssertions = (Threshold <= DebugLevel::Warning), bool VerboseInvariants = (Threshold <= DebugLevel::Warning)>
template<typename... Args>
struct anonymous_namespace{debug.hh}::ConditionalDebug< Threshold, Context, EnableAssertions, VerboseInvariants >::Invariant< Args >

Function-like class for invariants that is expected to be used via the deduction guide as:

ConditionalDebug::Invariant(someCondition, "A message...", ...);

Invariants are checked unconditionally but will log a verbose message only if VerboseInvariants is true (by default, if the threshold is less than or equal to Warning).

Definition at line 890 of file debug.hh.

Constructor & Destructor Documentation

◆ Invariant()

template<DebugLevelTemplateArgument Threshold, DebugContext Context, bool EnableAssertions = (Threshold <= DebugLevel::Warning), bool VerboseInvariants = (Threshold <= DebugLevel::Warning)>
template<typename... Args>
anonymous_namespace{debug.hh}::ConditionalDebug< Threshold, Context, EnableAssertions, VerboseInvariants >::Invariant< Args >::Invariant ( bool condition,
const char * fmt,
Args... args,
SourceLocation loc = SourceLocation::current() )
inline

The documentation for this struct was generated from the following file: