What does the term rebindable family types in C++ mean?
My query stems form the fact that allocators in c++ are supposed to be so-called rebindable family types.
And std::allocator
has such a constructor:
template <typename U>
allocator(const allocator<U>& other);
alongwith
template<typename _Tp1>
struct rebind
{ typedef new_allocator<_Tp1> other; };
Are there any custom examples to help understand that what is the need for this rebind to be there in first place within the std::allocator? What is the benefit it brings?