Skip to content

Commit

Permalink
routing: Fix c++17 build
Browse files Browse the repository at this point in the history
note: Structured bindings cannot be captured by lambda expressions until C++20
ref <https://en.cppreference.com/w/cpp/language/structured_binding>
  • Loading branch information
Mizux committed Feb 12, 2025
1 parent 7b71c4b commit 76cd621
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ortools/constraint_solver/routing_lp_scheduling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2196,8 +2196,10 @@ bool DimensionCumulOptimizerCore::SetRouteCumulConstraints(
}
}

for (const auto& [limit, min_break_duration] :
for (const auto& distance_duration :
dimension_->GetBreakDistanceDurationOfVehicle(vehicle)) {
const int64_t limit = distance_duration.first;
const int64_t min_break_duration = distance_duration.second;
int64_t min_num_breaks = 0;
if (limit > 0) {
min_num_breaks =
Expand Down

0 comments on commit 76cd621

Please sign in to comment.