Fix windows linear_solver.cc

Windows error
```
make cc
...
cl ...\\linear_solver.obj linear_solver.cc
.\\ortools\\linear_solver\\linear_solver.cc(466): error C2131: expression did not evaluate to a constant
dependencies\\install\\include\absl/strings/string_view.h(186): note: a non-constant (sub-)expression was encountered
```
see: https://ci.appveyor.com/project/lperron/or-tools-98u1n/builds/24076151/job/orlns0nwbidxytry#L4312
This commit is contained in:
Corentin Le Molgat
2019-04-25 10:00:21 +02:00
parent 99bbbfce9a
commit b40d6b59e3

View File

@@ -463,7 +463,12 @@ struct NamedOptimizationProblemType {
};
} // namespace
constexpr NamedOptimizationProblemType kOptimizationProblemTypeNames[] = {
#if defined(_MSC_VER)
const
#else
constexpr
#endif
NamedOptimizationProblemType kOptimizationProblemTypeNames[] = {
{MPSolver::GLOP_LINEAR_PROGRAMMING, "glop"},
#if defined(USE_GLPK)
{MPSolver::GLPK_LINEAR_PROGRAMMING, "glpk_lp"},