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

Mark a few constexpr locals in ThreadLocalTest as static

Summary:
Because, as discussed in past diffs, MSVC currently requires them to be static in order to resolve them from within the scope of a lambda when they aren't captured.
The only one that actually needs to be marked as `static` is `numReps`, but I like consistency, so I marked them all as static.

Reviewed By: yfeldblum

Differential Revision: D4191610

fbshipit-source-id: 7246170f30551d2079b4373eefbf3d02aab6dfa9
parent e50abbcc
...@@ -416,11 +416,11 @@ class FillObject { ...@@ -416,11 +416,11 @@ class FillObject {
#if FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR #if FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR
TEST(ThreadLocal, Stress) { TEST(ThreadLocal, Stress) {
constexpr size_t numFillObjects = 250; static constexpr size_t numFillObjects = 250;
std::array<ThreadLocalPtr<FillObject>, numFillObjects> objects; std::array<ThreadLocalPtr<FillObject>, numFillObjects> objects;
constexpr size_t numThreads = 32; static constexpr size_t numThreads = 32;
constexpr size_t numReps = 20; static constexpr size_t numReps = 20;
std::vector<std::thread> threads; std::vector<std::thread> threads;
threads.reserve(numThreads); threads.reserve(numThreads);
......
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