From 5440675c3d4cee703ccd7e7ef59257c9da5c9ffc Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 23 Aug 2016 10:20:00 -0700 Subject: [PATCH] Fix lambda capture expression for windows Summary: there was an error when accessing kItersPerThread in the lambda: https://ci.appveyor.com/project/Facebook/rocksdb/build/1.0.1654 Test Plan: doitlive Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D62379 --- util/thread_local_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/thread_local_test.cc b/util/thread_local_test.cc index 3f148b874..6506edcf5 100644 --- a/util/thread_local_test.cc +++ b/util/thread_local_test.cc @@ -466,7 +466,7 @@ TEST_F(ThreadLocalTest, Fold) { port::Mutex mu; port::CondVar cv(&mu); Params params(&mu, &cv, nullptr, kNumThreads, unref); - auto func = [](void* ptr) { + auto func = [&](void* ptr) { auto& p = *static_cast(ptr); ASSERT_TRUE(p.tls1.Get() == nullptr); p.tls1.Reset(new std::atomic(0));