libzypp: zypp-core/ng/pipelines/expected.h File Reference

libzypp 17.38.11

expected.h File Reference
`#include <stdexcept>`
`#include <zypp-core/ng/base/zyppglobal.h>`
`#include <zypp-core/ng/meta/Functional>`
`#include <zypp-core/ng/meta/type_traits.h>`
`#include <zypp-core/ng/pipelines/operators.h>`
`#include <exception>`

Go to the source code of this file.

## Classes
class | zyppng::unexpected< T >
class | zyppng::expected< T, E >
class | zyppng::expected< void, E >
struct | zyppng::detail::expected_result_helper< ResultType >
struct | zyppng::detail::and_then_helper< Callback >
struct | zyppng::detail::or_else_helper< Callback >
struct | zyppng::detail::inspect_helper< Callback >
struct | zyppng::detail::inspect_err_helper< Callback >
struct | zyppng::detail::collect_helper
struct | zyppng::detail::transform_collect_helper< Fun >

## Namespaces
namespace | zyppng
namespace | zyppng::detail
namespace | zyppng::operators

## Macros
#define | THROW_MSG_IF_EXCEPTIONS_ARE_ENABLED(WHAT)
#define | THROW_IF_EXCEPTIONS_ARE_ENABLED(WHAT)

## Typedefs
template<typename Function, typename ArgType>
using | zyppng::detail::mbind_cb_result_t = typename std::conditional_t< std::is_same_v<ArgType,void>, std::invoke_result<Function>,std::invoke_result<Function, ArgType> >::type

## Functions
template<class E>
| zyppng::unexpected (E) -> unexpected< E >
template<typename Type, typename Err = std::exception_ptr>
static expected< std::decay_t< Type >, Err > | zyppng::make_expected_success (Type &&t)
template<typename T>
bool | zyppng::detail::waitForCanContinueExpected (const expected< T > &value)
template<typename ResultType, typename E>
ResultType | zyppng::detail::expected_make_error (E &&error)
template<typename ResultType>
ResultType | zyppng::detail::expected_forward (ResultType &&res)
template<typename T, typename E, typename Function, typename ResultType = detail::mbind_cb_result_t<Function, T>>
ResultType | zyppng::and_then (const expected< T, E > &exp, Function &&f)
template<typename T, typename E, typename Function, typename ResultType = detail::mbind_cb_result_t<Function, T>>
ResultType | zyppng::and_then (expected< T, E > &&exp, Function &&f)
template<typename T, typename E, typename Function, typename ResultType = detail::mbind_cb_result_t<Function, E>>
ResultType | zyppng::or_else (const expected< T, E > &exp, Function &&f)
template<typename T, typename E, typename Function, typename ResultType = detail::mbind_cb_result_t<Function, E>>
ResultType | zyppng::or_else (expected< T, E > &&exp, Function &&f)
template<template< class, class... > class Container, typename T, typename E, typename ... CArgs>
std::enable_if_t<!std::is_same_v< void, T >, expected< Container< T >, E > > | zyppng::collect (Container< expected< T, E >, CArgs... > &&in)
template<template< class, class... > class Container, typename T, typename E, typename ... CArgs>
std::enable_if_t< std::is_same_v< void, T >, expected< T, E > > | zyppng::collect (Container< expected< T, E >, CArgs... > &&in)
template<typename T, typename E, typename Function>
expected< T, E > | zyppng::inspect (expected< T, E > exp, Function &&f)
template<typename T, typename E, typename Function>
expected< T, E > | zyppng::inspect_err (expected< T, E > exp, Function &&f)
template<typename Fun>
auto | zyppng::operators::mbind (Fun &&function)
template<typename Fun>
auto | zyppng::operators::and_then (Fun &&function)
template<typename Fun>
auto | zyppng::operators::or_else (Fun &&function)
template<typename Fun>
auto | zyppng::operators::inspect (Fun &&function)
template<typename Fun>
auto | zyppng::operators::inspect_err (Fun &&function)
detail::collect_helper | zyppng::operators::collect ()
template<template< class, class... > class Container, typename Msg, typename Transformation, typename Ret = std::result_of_t<Transformation(Msg)>, typename ... CArgs>
std::enable_if_t< is_instance_of_v< expected, Ret >, expected< Container< typename Ret::value_type > > > | zyppng::transform_collect (Container< Msg, CArgs... > &&in, Transformation &&f)
template<typename Transformation>
auto | zyppng::operators::transform_collect (Transformation &&f)

## Macro Definition Documentation

## ◆ THROW_MSG_IF_EXCEPTIONS_ARE_ENABLED

#define THROW_MSG_IF_EXCEPTIONS_ARE_ENABLED | ( |  | WHAT | ) |

Value:
throw std::logic_error(WHAT)

Definition at line 212 of file expected.h.

## ◆ THROW_IF_EXCEPTIONS_ARE_ENABLED

#define THROW_IF_EXCEPTIONS_ARE_ENABLED | ( |  | WHAT | ) |

Value:
throw std::logic_error(WHAT)

Definition at line 437 of file expected.h.