"Eric Woodruff" <[EMAIL PROTECTED]> wrote in message aslbsn$nt3$[EMAIL PROTECTED]">news:aslbsn$nt3$[EMAIL PROTECTED]... > [snip] > > > holder<Foo> h; > > new (h.storage) Foo; > > What is the meaning of that syntax?
This is placement new syntax. It means construct a Foo at the address h.storage, without allocating any memory. > > ... > > T* u = dangerous_cast<T*>(h.storage); // can't do this with > > reinterpret_cast > > Why would you want to do that in the first place. Because you want to get at the T in h in a portable way. Which brings me to my next point. Since it seems this is the only context in which this cast is guaranteed to give a meaningful result, maybe it should be called placement_cast<>? Dave _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost