[C++-sig] C++ object pointers contained in a vector
Roman Yakovenko
roman.yakovenko at gmail.com
Wed Oct 18 22:55:06 CEST 2006
On 10/18/06, Roman Yakovenko <roman.yakovenko at gmail.com> wrote:
> > > Take a look on this post:
> > > http://aspn.activestate.com/ASPN/Mail/Message/cpp-sig/2261029
> > >
> > > I am not sure about indexing suite v2, because you can change call
> > > policies: return_internal_reference.
> > >
> > > You can find documentation for indexing suite v2 here:
> > > http://tinyurl.com/yndgbw
> >
> > Seems to indicate that I need to use shared_ptr's instead of regular
> > pointers...
> >
> > Unfortunately I have thousands and thousands of line of C++ code all
> > written -- none of which use shared_ptrs. I have never used a shared_ptr but,
> > I get the feeling that I am going to have to change a lot of code and retest
> > everything :(
>
> Wait a little, I will try indexing suite v2 for you.
Okay, I tested your use case with indexing suite v2. If you set container
call policy to return_internal_reference all works as expected.
Here you will find all setup information and source code for v2 suite:
http://svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/indexing_suite_v2/
It should not take too much time to install it.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list