Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
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 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()

Definition at line 37 of file status_macros.h.