mirror of
https://github.com/nlohmann/json.git
synced 2026-03-05 00:36:28 +00:00
custom allocators: define missing 'rebind' type (#3895)
This commit is contained in:
committed by
GitHub
parent
b504dca35a
commit
6cec5aefc9
@@ -189,6 +189,15 @@ class my_allocator : public std::allocator<T>
|
||||
{
|
||||
public:
|
||||
using std::allocator<T>::allocator;
|
||||
|
||||
my_allocator() = default;
|
||||
template<class U> my_allocator(const my_allocator<U>& /*unused*/) { }
|
||||
|
||||
template <class U>
|
||||
struct rebind
|
||||
{
|
||||
using other = my_allocator<U>;
|
||||
};
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user