Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
expect.hpp File Reference

Go to the source code of this file.

Macro Definition Documentation

◆ ARENE_EXPECT

#define ARENE_EXPECT ( ...)
Value:
(::arene::base::expect_detail::check((__VA_ARGS__)) != 0)

A macro to use in an if statement to declare that the expression is expected to be true more often than it is false.

Usage: if(ARENE_EXPECT(the_answer == 42)) { ... }

Parameters
...The expression to evaluate
Precondition
expression must be convertible to bool