Add helper utility for checking values are true in coral

This commit is contained in:
kayomn 2023-02-24 22:53:42 +00:00
parent ea75a4f96e
commit e2f4ab77b6

View File

@ -333,6 +333,14 @@ export namespace coral {
returns(* dispatch)(void *, arguments...); 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. * Monadic container for a single-`element` value or nothing.
*/ */