Template Function rsl::maybe_error

Function Documentation

template<typename E, typename ...Args>
constexpr auto rsl::maybe_error(tl::expected<Args, E>... args)

Tests if any of the expected args passed in has an error.

Parameters:

args – tl::expected<T, E> parameter pack

Template Parameters:
  • E – The error type

  • Args – The value types for the tl::expected<T, E> args

Returns:

The first error found or nothing