This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstc++-v3 vector not convertible to pointer
- To: nbecker at fred dot net
- Subject: Re: libstc++-v3 vector not convertible to pointer
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 30 Nov 2000 20:33:47 +0100
- Cc: gcc at gcc dot gnu dot org, oon-list at oonumerics dot org
- Organization: CodeSourcery, LLC
- References: <x88u28peg2p.fsf@adglinux1.hns.com>
nbecker@fred.net writes:
| I see that in libstdc++-v3 (current cvs) a vector::iterator is no
| longer compatible with a pointer.
There is nothing in the Standard which says it should be -- actually
an implementation of quality won't use a plain pointer.
| ... Specifically, this won't work:
|
| reinterpret_cast<fftw_real*>(in.begin())
No one should be writing things like that.
If you want to access the address of the first element, then just say
&in[0]
as you would have, were `in' a C-like array.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com