Commit b41506c2 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Mark non-captured constexpr variable as static

Summary:
GCC & Clang allow the use of a non-captured constexpr local within a lambda, MSVC does not.

All 3 compilers allow this when the local has static storage.

Reviewed By: yfeldblum

Differential Revision: D4675147

fbshipit-source-id: 3e07eb77731cbd3ebda6aee4b0b57ac19ac34de5
parent 05d0e3ed
......@@ -46,7 +46,7 @@ uint8_t slowDefaultNumLowerBits(size_t upperBound, size_t size) {
TEST(EliasFanoCoding, defaultNumLowerBits) {
// Verify that slowDefaultNumLowerBits and optimized
// Encoder::defaultNumLowerBits agree.
constexpr size_t kNumIterations = 2500;
static constexpr size_t kNumIterations = 2500;
auto compare = [](size_t upperBound, size_t size) {
using Encoder = EliasFanoEncoderV2<size_t>;
EXPECT_EQ(int(slowDefaultNumLowerBits(upperBound, size)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment