Every allocator class must have an interface similar to the following:
template
class allocator
{
...
template
s
A quoted text from Foundations of Algorithms in C++11, Volume 1, chap 4, p. 35 :
template
struct allocator
{
template
using rebind = allocator;
};
sample usage :
allocator::rebind x;
In The C++ Programming Language, 4th edition, section 34.4.1, p. 998, commenting the 'classical' rebind member in default allocator class :
template
struct rebind { using other = allocator;};
Bjarne Stroustrup writes this:
The curious rebind template is an archaic alias. It should have been:
template
using other = allocator; However, allocator was defined before such aliases were supported by C++.