Add helper utility for checking values are true
in coral
This commit is contained in:
parent
ea75a4f96e
commit
e2f4ab77b6
@ -333,6 +333,14 @@ export namespace coral {
|
||||
returns(* dispatch)(void *, arguments...);
|
||||
};
|
||||
|
||||
/**
|
||||
* Helpful wrapper utility for using in chainable conditionals like [coral::expected::and_test] to check if a `bool`
|
||||
* is `true` without writing a lambda.
|
||||
*/
|
||||
constexpr bool is_true(bool value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Monadic container for a single-`element` value or nothing.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user