mirror of
https://github.com/nlohmann/json.git
synced 2026-10-08 23:47:13 +00:00
custom allocators: define missing 'rebind' type (#3895)
This commit is contained in:
1 parent
b504dca35a
commit
6cec5aefc9
2 files changed
+18
No files matched your search
@@ -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