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:
Ilya Biryukov 2018-06-06 09:22:19 +00:00
parent 5583ec4218
commit b7c3745006
1 changed files with 5 additions and 0 deletions

View File

@ -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; };
};