OR-Tools  9.3
util/status_macros.h File Reference

Go to the source code of this file.

Macros

#define OR_ASSIGN_OR_RETURN3(lhs, rexpr, error_expression)
 
#define OR_ASSIGN_OR_RETURN3_IMPL_(statusor, lhs, rexpr, error_expression)
 

Macro Definition Documentation

◆ OR_ASSIGN_OR_RETURN3

#define OR_ASSIGN_OR_RETURN3 (   lhs,
  rexpr,
  error_expression 
)
Value:
STATUS_MACROS_IMPL_CONCAT_(_status_or_value, __COUNTER__), lhs, rexpr, \
error_expression)
#define STATUS_MACROS_IMPL_CONCAT_(x, y)
#define OR_ASSIGN_OR_RETURN3_IMPL_(statusor, lhs, rexpr, error_expression)

Definition at line 32 of file util/status_macros.h.

◆ OR_ASSIGN_OR_RETURN3_IMPL_

#define OR_ASSIGN_OR_RETURN3_IMPL_ (   statusor,
  lhs,
  rexpr,
  error_expression 
)
Value:
auto statusor = (rexpr); \
if (!statusor.ok()) { \
::util::StatusBuilder _(std::move(statusor).status()); \
return (error_expression); \
} \
STATUS_MACROS_IMPL_UNPARENTHESIS(lhs) = std::move(statusor).value()
absl::Status status
Definition: g_gurobi.cc:35

Definition at line 37 of file util/status_macros.h.