10 template<
typename Ctx,
typename T>
21 , status_(std::move(
status))
26 inline operator bool() {
return status_.
is_ok(); }
29 template<
typename U = T,
30 typename std::enable_if<!std::is_void<U>::value,
int>::type = 0>
38 inline const Ctx&
context() {
return ctx_; }
47 template<
typename Ctx,
typename T>
Definition: status.hpp:19
bool is_err() const
Returns true if an errors occurs.
bool is_ok() const
Returns true if no errors occurs.
Definition: async_result.hpp:8
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:48
Definition: async_result.hpp:12
const U & operator*() const
Definition: async_result.hpp:31
bool is_err() const
Returns true if an errors occurs.
Definition: async_result.hpp:44
const Ctx & context()
Definition: async_result.hpp:38
AsyncResult(Ctx ctx, Status status, const T *data)
Definition: async_result.hpp:19
bool is_ok() const
Returns true if no errors occurs.
Definition: async_result.hpp:41
const T * operator->() const
Definition: async_result.hpp:27
const Status & status() const
Definition: async_result.hpp:36