Skip to content

Commit 3146cdb

Browse files
committed
lp_data: remove support for old MSVC.
1 parent 6889a3e commit 3146cdb

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

ortools/lp_data/lp_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class StrictITIVector : public util_intops::StrongVector<IntType, T, Alloc> {
298298

299299
// This allows for brace initialization, which is really useful in tests.
300300
// It is not 'explicit' by design, so one can do vector = {...};
301-
#if !defined(__ANDROID__) && (!defined(_MSC_VER) || (_MSC_VER >= 1800))
301+
#if !defined(__ANDROID__)
302302
StrictITIVector(std::initializer_list<T> init_list,
303303
const Alloc& a = Alloc()) // NOLINT
304304
: ParentType(init_list.begin(), init_list.end(), a) {}

ortools/lp_data/sparse.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ Fractional ComputeInfinityNormTemplate(const Matrix& matrix) {
9494
// --------------------------------------------------------
9595
SparseMatrix::SparseMatrix() : columns_(), num_rows_(0) {}
9696

97-
#if (!defined(_MSC_VER) || (_MSC_VER >= 1800))
9897
SparseMatrix::SparseMatrix(
9998
std::initializer_list<std::initializer_list<Fractional>> init_list) {
10099
ColIndex num_cols(0);
@@ -113,7 +112,6 @@ SparseMatrix::SparseMatrix(
113112
++row;
114113
}
115114
}
116-
#endif
117115

118116
void SparseMatrix::Clear() {
119117
columns_.clear();

ortools/lp_data/sparse.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030

3131
#include <algorithm>
3232
#include <cstdint>
33+
#include <initializer_list>
3334
#include <string>
3435
#include <vector>
3536

3637
#include "absl/log/check.h"
3738
#include "absl/types/span.h"
38-
#include "ortools/base/types.h"
3939
#include "ortools/graph_base/iterators.h"
4040
#include "ortools/lp_data/lp_types.h"
4141
#include "ortools/lp_data/permutation.h"
@@ -73,15 +73,13 @@ class SparseMatrix {
7373
// {1, 2, 3},
7474
// {4, 5, 6},
7575
// {7, 8, 9}};
76-
#if (!defined(_MSC_VER) || _MSC_VER >= 1800)
7776
SparseMatrix(
7877
std::initializer_list<std::initializer_list<Fractional>> init_list);
7978

8079
// This type is neither copyable nor movable.
8180
SparseMatrix(const SparseMatrix&) = delete;
8281
SparseMatrix& operator=(const SparseMatrix&) = delete;
8382

84-
#endif
8583
// Clears internal data structure, i.e. erases all the columns and set
8684
// the number of rows to zero.
8785
void Clear();

0 commit comments

Comments
 (0)