Zero-length arrays are non-standard (#4900)
zero-length arrays is a GNU C extension and fails to compile on Windows.
This commit is contained in:
committed by
Corentin Le Molgat
parent
d8d50bae68
commit
4793e1acb4
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "ortools/algorithms/space_saving_most_frequent.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
@@ -473,7 +474,7 @@ struct Element {
|
||||
Element() = default;
|
||||
explicit Element(int value) : value(value) {}
|
||||
int value;
|
||||
int zeros[kElementSize] = {};
|
||||
std::array<int, kElementSize> zeros;
|
||||
template <typename H>
|
||||
friend H AbslHashValue(H h, const Element& e) {
|
||||
return H::combine(std::move(h), e.value);
|
||||
|
||||
Reference in New Issue
Block a user