Velocity Reviews

Velocity Reviews (
-   C++ (
-   -   struct inside a class (

George2 02-27-2008 08:51 AM

struct inside a class
Hello everyone,

For the MSDN sample,


  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,

All times are GMT. The time now is 06:51 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.