This is an automated email from the ASF dual-hosted git repository.

cpcloud pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a1a34b8  ARROW-2169: [C++] MSVC is complaining about uncaptured 
variables
a1a34b8 is described below

commit a1a34b8ad1fefaefe45c97d92d471f085493776f
Author: Phillip Cloud <[email protected]>
AuthorDate: Sun Feb 18 14:29:15 2018 -0500

    ARROW-2169: [C++] MSVC is complaining about uncaptured variables
    
    Author: Phillip Cloud <[email protected]>
    
    Closes #1622 from cpcloud/ARROW-2169 and squashes the following commits:
    
    fc0b02c5 [Phillip Cloud] ARROW-2169: [C++] MSVC is complaining about 
uncaptured variables
---
 cpp/src/arrow/array-test.cc      | 4 ++--
 cpp/src/arrow/io/io-file-test.cc | 8 ++++----
 cpp/src/arrow/io/io-hdfs-test.cc | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cpp/src/arrow/array-test.cc b/cpp/src/arrow/array-test.cc
index d68b04d..1d321e6 100644
--- a/cpp/src/arrow/array-test.cc
+++ b/cpp/src/arrow/array-test.cc
@@ -1273,7 +1273,7 @@ class TestFWBinaryArray : public ::testing::Test {
 };
 
 TEST_F(TestFWBinaryArray, Builder) {
-  constexpr int32_t byte_width = 10;
+  int32_t byte_width = 10;
   int64_t length = 4096;
 
   int64_t nbytes = length * byte_width;
@@ -1288,7 +1288,7 @@ TEST_F(TestFWBinaryArray, Builder) {
 
   std::shared_ptr<Array> result;
 
-  auto CheckResult = [&length, &is_valid, &raw_data](const Array& result) {
+  auto CheckResult = [&length, &is_valid, &raw_data, &byte_width](const Array& 
result) {
     // Verify output
     const auto& fw_result = static_cast<const FixedSizeBinaryArray&>(result);
 
diff --git a/cpp/src/arrow/io/io-file-test.cc b/cpp/src/arrow/io/io-file-test.cc
index a492016..7a7f396 100644
--- a/cpp/src/arrow/io/io-file-test.cc
+++ b/cpp/src/arrow/io/io-file-test.cc
@@ -393,9 +393,9 @@ TEST_F(TestReadableFile, ThreadSafety) {
   ASSERT_OK(ReadableFile::Open(path_, &pool, &file_));
 
   std::atomic<int> correct_count(0);
-  constexpr int niter = 10000;
+  int niter = 10000;
 
-  auto ReadData = [&correct_count, &data, this]() {
+  auto ReadData = [&correct_count, &data, &niter, this]() {
     std::shared_ptr<Buffer> buffer;
 
     for (int i = 0; i < niter; ++i) {
@@ -586,9 +586,9 @@ TEST_F(TestMemoryMappedFile, ThreadSafety) {
   ASSERT_OK(file->Write(data.c_str(), static_cast<int64_t>(data.size())));
 
   std::atomic<int> correct_count(0);
-  constexpr int niter = 10000;
+  int niter = 10000;
 
-  auto ReadData = [&correct_count, &data, &file]() {
+  auto ReadData = [&correct_count, &data, &file, &niter]() {
     std::shared_ptr<Buffer> buffer;
 
     for (int i = 0; i < niter; ++i) {
diff --git a/cpp/src/arrow/io/io-hdfs-test.cc b/cpp/src/arrow/io/io-hdfs-test.cc
index 380fb34..610a91f 100644
--- a/cpp/src/arrow/io/io-hdfs-test.cc
+++ b/cpp/src/arrow/io/io-hdfs-test.cc
@@ -452,9 +452,9 @@ TYPED_TEST(TestHadoopFileSystem, ThreadSafety) {
   ASSERT_OK(this->client_->OpenReadable(src_path, &file));
 
   std::atomic<int> correct_count(0);
-  constexpr int niter = 1000;
+  int niter = 1000;
 
-  auto ReadData = [&file, &correct_count, &data]() {
+  auto ReadData = [&file, &correct_count, &data, &niter]() {
     for (int i = 0; i < niter; ++i) {
       std::shared_ptr<Buffer> buffer;
       if (i % 2 == 0) {

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to