From 3c64dfa3441ed5dc3271ae4cac5577f7c4de2dc7 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Thu, 7 Sep 2023 17:55:21 +0200 Subject: [PATCH] fixup 3 --- .../math_opt/cpp/variable_and_expressions.h | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/ortools/math_opt/cpp/variable_and_expressions.h b/ortools/math_opt/cpp/variable_and_expressions.h index 02a0f2c5e87..db3bc881600 100644 --- a/ortools/math_opt/cpp/variable_and_expressions.h +++ b/ortools/math_opt/cpp/variable_and_expressions.h @@ -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 { @@ -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_