diff --git a/source/coral.cpp b/source/coral.cpp index 3edd14f..8843e77 100644 --- a/source/coral.cpp +++ b/source/coral.cpp @@ -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. */