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

Adjust the Function::NonCopyableLambda test to use a large struct rather than a C Array

Summary:
Because MSVC doesn't like it when you attempt to explicitly capture a c-style array in a lambda capture list.
See: https://developercommunity.visualstudio.com/content/problem/2444/cannot-explicitly-capture-c-style-array-in-lambda.html

Reviewed By: yfeldblum

Differential Revision: D4191400

fbshipit-source-id: 305f8086c29f079ccf2c322f20da6393235bc76d
parent a4c2f8ff
......@@ -197,8 +197,10 @@ TEST(Function, NonCopyableLambda) {
auto unique_ptr_int = folly::make_unique<int>(900);
EXPECT_EQ(900, *unique_ptr_int);
char fooData[64] = {0};
EXPECT_EQ(0, fooData[0]); // suppress gcc warning about fooData not being used
struct {
char data[64];
} fooData = {{0}};
(void)fooData; // suppress gcc warning about fooData not being used
auto functor = std::bind(
[fooData](std::unique_ptr<int>& up) mutable { return ++*up; },
......
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