struct inside a class

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top