ORIGINAL
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
original::staticError< ERR, TRIGGERING_CONDITION > Class Template Reference

Compile-time error triggering utility. More...

#include <error.h>

Collaboration diagram for original::staticError< ERR, TRIGGERING_CONDITION >:
Collaboration graph

Static Public Member Functions

static void asserts ()
 Triggers static assertion if the condition is true.
 

Detailed Description

template<typename ERR, const bool TRIGGERING_CONDITION>
requires ExtendsOf<error, ERR>
class original::staticError< ERR, TRIGGERING_CONDITION >

Compile-time error triggering utility.

Template Parameters
ERRException class to represent the error.
TRIGGERING_CONDITIONWhether to trigger the static assertion. @requires ERR must inherit from error.

Usage Examples

// Compile-time type checking
// Compile-time bounds checking
// Compile-time null pointer checking
Exception for null pointer dereference attempts.
Definition error.h:245
Exception for container index out-of-range errors.
Definition error.h:192
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Compile-time error triggering utility.
Definition error.h:167
static void asserts()
Triggers static assertion if the condition is true.
Definition error.h:174

Member Function Documentation

◆ asserts()

template<typename ERR , const bool TRIGGERING_CONDITION>
static void original::staticError< ERR, TRIGGERING_CONDITION >::asserts ( )
inlinestatic

Triggers static assertion if the condition is true.

When TRIGGERING_CONDITION is true, this method will cause a compilation error with a descriptive message based on the ERR type.

Examples
/home/runner/work/original/original/src/core/tuple.h.

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