forked from OSchip/llvm-project
Fix compile error with libstdc++.
By adding a ctor to create fuzzer_allocator<T> from fuzzer_allocator<U>. This mimics construcotrs of std::allocator<T>. Without the constructors, some versions of libstdc++ can't compile `vector<bool, fuzzer_allocator<bool>>`. llvm-svn: 334077
This commit is contained in:
parent
5583ec4218
commit
b7c3745006
|
@ -155,6 +155,11 @@ extern ExternalFunctions *EF;
|
|||
template<typename T>
|
||||
class fuzzer_allocator: public std::allocator<T> {
|
||||
public:
|
||||
fuzzer_allocator() = default;
|
||||
|
||||
template<class U>
|
||||
fuzzer_allocator(const fuzzer_allocator<U>&) {}
|
||||
|
||||
template<class Other>
|
||||
struct rebind { typedef fuzzer_allocator<Other> other; };
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue