 |
OR-Tools
9.3
|
Go to the documentation of this file.
14#ifndef OR_TOOLS_UTIL_STATUS_MACROS_H_
15#define OR_TOOLS_UTIL_STATUS_MACROS_H_
32#define OR_ASSIGN_OR_RETURN3(lhs, rexpr, error_expression) \
33 OR_ASSIGN_OR_RETURN3_IMPL_( \
34 STATUS_MACROS_IMPL_CONCAT_(_status_or_value, __COUNTER__), lhs, rexpr, \
37#define OR_ASSIGN_OR_RETURN3_IMPL_(statusor, lhs, rexpr, error_expression) \
38 auto statusor = (rexpr); \
39 if (!statusor.ok()) { \
40 ::util::StatusBuilder _(std::move(statusor).status()); \
41 return (error_expression); \
43 STATUS_MACROS_IMPL_UNPARENTHESIS(lhs) = std::move(statusor).value()