Skip to content

Commit

Permalink
fix the heap-vector test custom allocator
Browse files Browse the repository at this point in the history
Summary: It is missing `rebind` which at least some versions of libstdc++ with g++ seem to require.

Reviewed By: dmm-fb

Differential Revision: D56971559

fbshipit-source-id: 33fe5452702c9a5d385e236035ba0e6a02fbfe47
  • Loading branch information
yfeldblum authored and facebook-github-bot committed May 6, 2024
1 parent 0950245 commit eb09127
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions folly/container/test/heap_vector_types_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ struct CountingAllocator : std::allocator<T> {
return std::allocator<T>::allocate(n);
}
int nAllocations{0};

template <typename U>
struct rebind {
using other = CountingAllocator<U>;
};
};

struct CountCopyCtor {
Expand Down

0 comments on commit eb09127

Please sign in to comment.