Template Function operator|(tl::expected<T, E> const&, Fn)

Function Documentation

template<typename T, typename E, typename Fn>
constexpr auto operator|(tl::expected<T, E> const &exp, Fn fn)

Overload of the | operator as bind.

Parameters:
  • exp – Input tl::expected<T,E> value

  • fn – Function to apply

Template Parameters:
  • T – Type for the input expected

  • E – Error type

  • Fn – Function

Returns:

Return type of fn