From 9411ebdd508dda95495a9dc64d6b6765c8a1d6f7 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Fri, 8 Sep 2023 11:02:17 +0200 Subject: [PATCH] Fixup 6 dev note fixup5 trace ``` 2023-09-08T08:36:35.9257982Z indicator_constraint.cc 2023-09-08T08:36:35.9260453Z quadratic_constraint.cc 2023-09-08T08:36:39.3660465Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(190,23): error C3615: constexpr function 'std::equal_to::operator ()' cannot result in a constant expression (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\quadratic\quadratic_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] 2023-09-08T08:36:39.3663407Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(190,23): error C3615: constexpr function 'std::equal_to::operator ()' cannot result in a constant expression (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\indicator\indicator_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] 2023-09-08T08:36:39.3670073Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(193,21): message : failure was caused by call of undefined function or one not declared 'constexpr' (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\indicator\indicator_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] 2023-09-08T08:36:39.3672364Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(193,21): message : see usage of 'operations_research::math_opt::internal::VariablesEquality::operator bool' (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\indicator\indicator_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] 2023-09-08T08:36:39.3811123Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(193,21): message : failure was caused by call of undefined function or one not declared 'constexpr' (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\quadratic\quadratic_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] 2023-09-08T08:36:39.4258298Z D:\a\or-tools\or-tools\ortools/math_opt/cpp/variable_and_expressions.h(193,21): message : see usage of 'operations_research::math_opt::internal::VariablesEquality::operator bool' (compiling source file D:\a\or-tools\or-tools\ortools\math_opt\constraints\quadratic\quadratic_constraint.cc) [D:\a\or-tools\or-tools\build\ortools\math_opt\ortools_math_opt.vcxproj] ``` --- ortools/math_opt/cpp/variable_and_expressions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortools/math_opt/cpp/variable_and_expressions.h b/ortools/math_opt/cpp/variable_and_expressions.h index c35c80d265..3d64b24cb8 100644 --- a/ortools/math_opt/cpp/variable_and_expressions.h +++ b/ortools/math_opt/cpp/variable_and_expressions.h @@ -187,7 +187,7 @@ inline bool operator!=(const Variable& lhs, const Variable& rhs); namespace std { template<> struct equal_to<::operations_research::math_opt::Variable> { - constexpr bool operator()( + bool operator()( const ::operations_research::math_opt::Variable& lhs, const ::operations_research::math_opt::Variable& rhs ) const { return lhs == rhs;