libzypp 17.37.17
expected.h File Reference
#include <zypp-core/zyppng/meta/Functional>
#include <zypp-core/zyppng/pipelines/AsyncResult>
#include <zypp-core/zyppng/pipelines/Wait>
#include <zypp-core/zyppng/pipelines/Transform>
Include dependency graph for expected.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  zyppng::expected< T, E >
class  zyppng::expected< void, E >
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<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 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>
auto 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 149 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 364 of file expected.h.