libstc++-v3 vector not convertible to pointer

Gabriel Dos Reis gdr@codesourcery.com
Thu Nov 30 11:35:00 GMT 2000


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


More information about the Gcc mailing list