From 61a96501d8da914c23c4d6d0b9ca49a18f58bea0 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 30 Jun 2016 18:19:14 -0700 Subject: [PATCH] Use std::vector in the CacheLocalityBenchmark rather than a VLA Summary: Because MSVC doesn't support VLAs. Reviewed By: yfeldblum Differential Revision: D3506835 fbshipit-source-id: 8683b5c513ed25e7f47642c8493f8b10da9906be --- folly/test/CacheLocalityBenchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/CacheLocalityBenchmark.cpp b/folly/test/CacheLocalityBenchmark.cpp index 81f094d9..cc570391 100644 --- a/folly/test/CacheLocalityBenchmark.cpp +++ b/folly/test/CacheLocalityBenchmark.cpp @@ -160,7 +160,7 @@ static void contentionAtWidth(size_t iters, size_t stripes, size_t work) { std::vector threads; while (threads.size() < numThreads) { threads.push_back(std::thread([&, iters, stripes, work]() { - std::atomic* counters[stripes]; + auto counters = std::vector*>(stripes); for (size_t i = 0; i < stripes; ++i) { counters[i] = new (raw.data() + counterAlignment * i) std::atomic(); -- 2.34.1