utils.hh: work around MSVC STL bug

This commit is contained in:
Fangrui Song 2019-06-17 23:42:48 -07:00
parent d3808de26a
commit f54fac0303

View File

@ -144,7 +144,7 @@ public:
template <typename T> struct Vec { template <typename T> struct Vec {
std::unique_ptr<T[]> a; std::unique_ptr<T[]> a;
int s = 0; int s = 0;
#if !(__clang__ || __GNUC__ > 7 || __GNUC__ == 7 && __GNUC_MINOR__ >= 4) #if !(__clang__ || __GNUC__ > 7 || __GNUC__ == 7 && __GNUC_MINOR__ >= 4) || defined(_WIN32)
// Work around a bug in GCC<7.4 that optional<IndexUpdate> would not be // Work around a bug in GCC<7.4 that optional<IndexUpdate> would not be
// construtible. // construtible.
Vec() = default; Vec() = default;