|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-07-17 10:01:55
on Mon Jul 16 2007, Thorsten Ottosen <thorsten.ottosen-AT-dezide.com> wrote:
>> // Won't work: no way to get to raw storage
>> return FiddleWithStuff(&output[0], count, ...);
>> }
>
> Well, it's ugly, but you can do something along
>
> reinterpret_cast<OldStuff**>( &*output.begin().base() )
You should almost never recommend reinterpret_cast, as its semantics
are (mostly) implementation-defined. You probably mean to static_cast
twice, passing through void*
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
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