2020-01-21 20:59:17 +03:00
|
|
|
/*
|
|
|
|
* 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"
|
|
|
|
|
2021-06-09 05:28:36 +03:00
|
|
|
namespace facebook::eden {
|
2020-01-21 20:59:17 +03:00
|
|
|
|
|
|
|
// Older versions of MSVC++ ICE on the following code.
|
2020-05-07 01:03:48 +03:00
|
|
|
#if !defined(_MSC_FULL_VER) || _MSC_FULL_VER >= 192027508
|
2020-01-21 20:59:17 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-06-09 05:28:36 +03:00
|
|
|
} // namespace facebook::eden
|