Skip to content

Commit

Permalink
fixup 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 7, 2023
1 parent 0fdba33 commit 3c64dfa
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions ortools/math_opt/cpp/variable_and_expressions.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,25 @@
#include "ortools/math_opt/storage/model_storage.h"
#include "ortools/math_opt/storage/model_storage_types.h"


namespace operations_research::math_opt {
class Variable;
}

#if defined(_MSC_VER)
namespace std {
template<>
struct equal_to<::operations_research::math_opt::Variable> {
constexpr bool operator()(
const ::operations_research::math_opt::Variable& lhs,
const ::operations_research::math_opt::Variable& rhs ) const {
return lhs == rhs;
}
};
} // namespace std
#endif


namespace operations_research {
namespace math_opt {

Expand Down Expand Up @@ -3148,17 +3167,4 @@ BoundedQuadraticExpression operator==(const double lhs,
} // namespace math_opt
} // namespace operations_research

#if defined(_MSC_VER)
namespace std {
template<>
struct equal_to<::operations_research::math_opt::Variable> {
constexpr bool operator()(
const ::operations_research::math_opt::Variable& lhs,
const ::operations_research::math_opt::Variable& rhs ) const {
return lhs == rhs;
}
};
} // namespace std
#endif

#endif // OR_TOOLS_MATH_OPT_CPP_VARIABLE_AND_EXPRESSIONS_H_

0 comments on commit 3c64dfa

Please sign in to comment.