This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstc++-v3 vector not convertible to pointer


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]