Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math/or-tools: Fix build with abseil 20230125.0+ and re2 20230601+
Reference: google/or-tools#3655
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- ortools/lp_data/lp_parser.cc.orig 2022-11-25 09:21:54 UTC | ||
+++ ortools/lp_data/lp_parser.cc | ||
@@ -185,7 +185,7 @@ bool LPParser::ParseIntegerVariablesList(StringPiece l | ||
|
||
bool LPParser::ParseConstraint(StringPiece constraint) { | ||
const StatusOr<ParsedConstraint> parsed_constraint_or_status = | ||
- ::operations_research::glop::ParseConstraint(constraint.as_string()); | ||
+ ::operations_research::glop::ParseConstraint(std::string(constraint)); | ||
if (!parsed_constraint_or_status.ok()) return false; | ||
const ParsedConstraint& parsed_constraint = | ||
parsed_constraint_or_status.value(); | ||
@@ -414,7 +414,7 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::strin | ||
if (ConsumeToken(&constraint, &consumed_name, &consumed_coeff) != | ||
TokenType::END) { | ||
return absl::InvalidArgumentError(absl::StrCat( | ||
- "End of input was expected, found: ", constraint.as_string())); | ||
+ "End of input was expected, found: ", std::string(constraint))); | ||
} | ||
} | ||
|