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: Lee Iverson <leei at AI dot SRI dot COM>
- Date: Thu, 30 Nov 2000 12:22:08 -0800
- cc: Gabriel Dos Reis <gdr at codesourcery dot com>, gcc at gcc dot gnu dot org, oon-list at oonumerics dot org
In message <x88r93tb60y.fsf@adglinux1.hns.com>, nbecker@fred.net writes:
>
>I want to interoperate with existing C libraries that expect a
>pointer. High performance computing requires this (at least for
>now). My point is not that there is anything wrong with libstdc++.
>For high performance we need a different vector-like container that
>does interoperate with C.
You've already got it. What people have been telling you is that the
way you were converting from vector->pointer was wrong. Use the
&in[0] syntax and you should be just fine.
>Are there any other STL-compatible containers that have the required
>properties?
Keep on using vector. Change your conversion code. It will work with
both old and new libraries. Be happy.
-------------------------------------------------------------------------------
Lee Iverson SRI International
leei@ai.sri.com 333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/ (650) 859-3307