Boost Users :
From: Chris Newbold (Chris.Newbold_at_[hidden])
Date: 2007-07-17 09:52:35
On Mon, 16 Jul 2007 17:38:13 +0200, Thorsten Ottosen wrote:
> Well, it's ugly, but you can do something along
> reinterpret_cast<OldStuff**>( &*output.begin().base() )
Thanks for the reply. Is this guaranteed to work (at least in the case of
ptr_vector)? I recall seeing a comment you made in the context of a
discussion about the defunct ptr_begin(), etc. family of functions that
there was no reliable, portable cast from void* to T* and that the
pointer containers were now using void* storage.
If you know that a T* went into a given void*, I've always figured that
reinterpret_cast<T*> would get it back out again. Am I missing something?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net