sapling/eden/fs/store/KeySpace.cpp
Chad Austin 600da9aef0 bump the assertKeySpaceInvariants to a newer MSVC
Summary: I reproduced the KeySpace.cpp ICE on my Windows 10 VM, so bump the MSVC version check. I have not confirmed it does not ICE on MSVC 2019.

Reviewed By: pkaush

Differential Revision: D19562325

fbshipit-source-id: 03cf84e95c709bb2ebe7c3e0055a4f290eb17f8a
2020-01-24 22:34:24 -08:00

35 lines
711 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#include "eden/fs/store/KeySpace.h"
namespace facebook {
namespace eden {
// Older versions of MSVC++ ICE on the following code.
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191627036
namespace {
constexpr bool assertKeySpaceInvariants() {
size_t index = 0;
for (auto& ks : KeySpace::kAll) {
if (index != ks->index) {
return false;
}
index += 1;
}
return index == KeySpace::kTotalCount;
}
} // namespace
static_assert(assertKeySpaceInvariants());
#endif
} // namespace eden
} // namespace facebook