Commit a2782696 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix folly/test/small_vector_test.cpp under gcc8 with -Wshadow

Summary:
[Folly] Fix `folly/test/small_vector_test.cpp` under gcc8 with `-Wshadow`.

```
folly/test/small_vector_test.cpp: In member function 'virtual void small_vector_NoCopyCtor_Test::TestBody()':
folly/test/small_vector_test.cpp:898:10: error: declaration of 'struct small_vector_NoCopyCtor_Test::TestBody()::Test' shadows a previous local [-Werror=shadow]
In file included from folly/portability/GTest.h:33,
                 from folly/test/small_vector_test.cpp:33:
third-party-buck/platform007/build/googletest/include/gtest/gtest.h:371:52: note: shadowed declaration is here
```

Reviewed By: Orvid

Differential Revision: D13603337

fbshipit-source-id: 84747335787df4c9288d93f19bd0629c53a68e4d
parent 811057f7
......@@ -895,15 +895,15 @@ TEST(small_vector, InputIterator) {
}
TEST(small_vector, NoCopyCtor) {
struct Test {
Test() = default;
Test(const Test&) = delete;
Test(Test&&) = default;
struct Tester {
Tester() = default;
Tester(const Tester&) = delete;
Tester(Tester&&) = default;
int field = 42;
};
small_vector<Test> test(10);
small_vector<Tester> test(10);
ASSERT_EQ(test.size(), 10);
for (const auto& element : test) {
EXPECT_EQ(element.field, 42);
......
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