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

Fix gcc-specific problem in reentrant_allocator test

Summary:
[Folly] Fix gcc-specific problem in `reentrant_allocator` test.

```
folly/memory/test/ReentrantAllocatorTest.cpp: In member function ‘virtual void ReentrantAllocatorTest_large_Test::TestBody()’:
folly/folly/memory/test/ReentrantAllocatorTest.cpp:68:22: error: no matching function for call to ‘std::vector<ReentrantAllocatorTest_large_Test::TestBody()::type, folly::reentrant_allocator<ReentrantAllocatorTest_large_Test::TestBody()::type> >::push_back(<brace-enclosed initializer list>)’
     vec.push_back({i});
                      ^
```

Reviewed By: simpkins

Differential Revision: D19652353

fbshipit-source-id: ca72a80002096e1d35c61a219f9af271fa79a4a7
parent b206a6bd
...@@ -65,7 +65,7 @@ TEST_F(ReentrantAllocatorTest, large) { ...@@ -65,7 +65,7 @@ TEST_F(ReentrantAllocatorTest, large) {
folly::reentrant_allocator<void> alloc{opts}; folly::reentrant_allocator<void> alloc{opts};
std::vector<type, folly::reentrant_allocator<type>> vec{alloc}; std::vector<type, folly::reentrant_allocator<type>> vec{alloc};
for (auto i = 0u; i < (1u << 16); ++i) { for (auto i = 0u; i < (1u << 16); ++i) {
vec.push_back({i}); vec.push_back(type{i});
} }
for (auto i = 0u; i < (1u << 16); ++i) { for (auto i = 0u; i < (1u << 16); ++i) {
EXPECT_EQ(i, std::get<0>(vec.at(i))); EXPECT_EQ(i, std::get<0>(vec.at(i)));
......
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