Go to the source code of this file.
Namespaces | |
namespace | util |
Defines | |
#define | ASSIGN_OR_RETURN(lhs, rexpr) |
#define | ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr) |
#define | RETURN_IF_ERROR(expr) |
#define | STATUS_MACROS_CONCAT_NAME(x, y) STATUS_MACROS_CONCAT_NAME_INNER(x, y) |
#define | STATUS_MACROS_CONCAT_NAME_INNER(x, y) x##y |
Functions | |
template<typename T > | |
Status | util::DoAssignOrReturn (T &lhs, StatusOr< T > result) |
#define ASSIGN_OR_RETURN | ( | lhs, | |
rexpr | |||
) |
ASSIGN_OR_RETURN_IMPL( \ STATUS_MACROS_CONCAT_NAME(_status_or_value, __COUNTER__), lhs, rexpr);
Definition at line 72 of file status_macros.h.
#define ASSIGN_OR_RETURN_IMPL | ( | status, | |
lhs, | |||
rexpr | |||
) |
::util::Status status = DoAssignOrReturn(lhs, (rexpr)); \ if (!status.ok()) return status;
Definition at line 59 of file status_macros.h.
#define RETURN_IF_ERROR | ( | expr | ) |
do { \ /* Using _status below to avoid capture problems if expr is "status". */ \ const ::util::Status _status = (expr); \ if (!_status.ok()) return _status; \ } while (0)
Definition at line 40 of file status_macros.h.
#define STATUS_MACROS_CONCAT_NAME | ( | x, | |
y | |||
) | STATUS_MACROS_CONCAT_NAME_INNER(x, y) |
Definition at line 49 of file status_macros.h.
#define STATUS_MACROS_CONCAT_NAME_INNER | ( | x, | |
y | |||
) | x##y |
Definition at line 48 of file status_macros.h.