co_usb
Loading...
Searching...
No Matches
co_usb::detail::as_exception_t Struct Reference

Exception error protocol. More...

#include <error_protocol.hpp>

Public Types

template<typename ValTy >
using return_type = ValTy
 

Public Member Functions

constexpr as_exception_t ()
 
template<typename U >
auto with_error (std::error_code ec) -> return_type< U >
 
template<typename U , typename... Args>
auto with_success (Args &&...args) -> return_type< U >
 

Detailed Description

Exception error protocol.

Base error protocol that signals errors as std::system_error exceptions. Its result value is the success value type.

Note
with_error throws std::system_error.

Member Typedef Documentation

◆ return_type

template<typename ValTy >
using co_usb::detail::as_exception_t::return_type = ValTy

Constructor & Destructor Documentation

◆ as_exception_t()

constexpr co_usb::detail::as_exception_t::as_exception_t ( )
inlineexplicitconstexpr

Member Function Documentation

◆ with_error()

template<typename U >
auto co_usb::detail::as_exception_t::with_error ( std::error_code  ec) -> return_type<U>
inline

◆ with_success()

template<typename U , typename... Args>
auto co_usb::detail::as_exception_t::with_success ( Args &&...  args) -> return_type<U>
inline

The documentation for this struct was generated from the following file: