13 #ifndef __PROCESS_CHECK_HPP__    14 #define __PROCESS_CHECK_HPP__    26 #define CHECK_PENDING(expression)                                       \    27   CHECK_STATE(CHECK_PENDING, _check_pending, expression)    29 #define CHECK_READY(expression)                                         \    30   CHECK_STATE(CHECK_READY, _check_ready, expression)    32 #define CHECK_DISCARDED(expression)                                     \    33   CHECK_STATE(CHECK_DISCARDED, _check_discarded, expression)    35 #define CHECK_FAILED(expression)                                        \    36   CHECK_STATE(CHECK_FAILED, _check_failed, expression)    38 #define CHECK_ABANDONED(expression)                                     \    39   CHECK_STATE(CHECK_ABANDONED, _check_abandoned, expression)    47     return Error(
"is READY");
    49     return Error(
"is DISCARDED");
    63     return Error(
"is PENDING");
    65     return Error(
"is DISCARDED");
    79     return Error(
"is PENDING");
    81     return Error(
"is READY");
    95     return Some(
"is PENDING");
    97     return Some(
"is READY");
    99     return Some(
"is DISCARDED");
   107 template <
typename T>
   111     return Some(
"is READY");
   113     return Some(
"is DISCARDED");
   117     return Some(
"is not abandoned");
   124 #endif // __PROCESS_CHECK_HPP__ bool isReady() const 
Definition: future.hpp:1215
Definition: errorbase.hpp:36
F && f
Definition: defer.hpp:270
Option< Error > _check_abandoned(const process::Future< T > &f)
Definition: check.hpp:108
Option< Error > _check_failed(const process::Future< T > &f)
Definition: check.hpp:92
bool isPending() const 
Definition: future.hpp:1208
Option< Error > _check_pending(const process::Future< T > &f)
Definition: check.hpp:44
bool isDiscarded() const 
Definition: future.hpp:1222
Option< Error > _check_discarded(const process::Future< T > &f)
Definition: check.hpp:76
_Some< typename std::decay< T >::type > Some(T &&t)
Definition: some.hpp:42
bool isAbandoned() const 
Definition: future.hpp:1236
const std::string & failure() const 
Definition: future.hpp:1320
Option< Error > _check_ready(const process::Future< T > &f)
Definition: check.hpp:60
bool isFailed() const 
Definition: future.hpp:1229
Definition: future.hpp:58