Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include "ortools/base/status_macros.h"
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) |
#define OR_ASSIGN_OR_RETURN3 | ( | lhs, | |
rexpr, | |||
error_expression ) |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Executes an expression that returns an absl::StatusOr, extracting its value into the variable defined by lhs or returning on error and enabling decorating it with the third argument.
Example: Assigning to an existing value ValueType value; OR_ASSIGN_OR_RETURN3(value, MaybeGetValue(arg), _ << "context"); OR_ASSIGN_OR_RETURN3((auto [key, val]), MaybeGetValue(arg), _ << "with key " << key);
Definition at line 32 of file status_macros.h.
#define OR_ASSIGN_OR_RETURN3_IMPL_ | ( | statusor, | |
lhs, | |||
rexpr, | |||
error_expression ) |
Definition at line 37 of file status_macros.h.