Hello everyone,
For the MSDN sample,
http://msdn2.microsoft.com/en-us/library/2af6btx2.aspx
My question is, what is the purpose of defining an internal struct which has only a type? How to use it? Why class U is different from _Ty?
(I see similar code in STL internal implementation for allocator class, seems like a pattern which I do not know.)
thanks in advance,
George
For the MSDN sample,
http://msdn2.microsoft.com/en-us/library/2af6btx2.aspx
Code:
template <class U>
struct rebind { typedef stingyallocator<U> other; };
My question is, what is the purpose of defining an internal struct which has only a type? How to use it? Why class U is different from _Ty?
(I see similar code in STL internal implementation for allocator class, seems like a pattern which I do not know.)
thanks in advance,
George