CppWAMP
C++11 client library for the WAMP protocol
erroror.hpp File Reference

Contains the ErrorOr template class. More...

#include <cassert>
#include <functional>
#include <system_error>
#include <utility>
#include "api.hpp"
#include "config.hpp"
#include "error.hpp"
#include "traits.hpp"

Go to the source code of this file.

Classes

class  wamp::Unexpected< E >
 Minimalistic implementation of std::unexpected<std::error_code>. More...
 
class  wamp::ErrorOr< T >
 Minimalistic implementation of std::expected<T, std::error_code> More...
 

Namespaces

 wamp
 

Typedefs

using wamp::UnexpectedError = Unexpected< std::error_code >
 Type alias for Unexpected<std::error_code>.
 
template<typename T >
using wamp::AsyncHandler = std::function< void(ErrorOr< T >)>
 Type alias for a handler taking an ErrorOr<T> parameter.
 

Functions

template<typename TErrorEnum >
UnexpectedError wamp::makeUnexpectedError (TErrorEnum errc)
 Convenience function that creates an UnexpectedError from an error code enum.
 

Detailed Description

Contains the ErrorOr template class.