[C++-sig] Wrap a c++ function that returns boost::shared_ptr<> type?
David Abrahams
dave at boostpro.com
Fri Dec 19 09:16:44 CET 2008
on Thu Dec 18 2008, "lin yun" <yunlin07-AT-gmail.com> wrote:
> Would you please elaborate your idea a little more?
>
>
> On Thu, Dec 18, 2008 at 10:18 AM, David Abrahams <dave at boostpro.com> wrote:
>
>>
>> on Wed Dec 17 2008, "lin yun" <yunlin07-AT-gmail.com> wrote:
>>
>> >> Yes. I believe Py++ deals with boost::shared_ptr without invoking the
>> >> user. Just use default call policy.
>> > That's good news! How about vector<boost::shared_ptr<unsigned short *>> ?
>>
>> If you use the facilities of
>> http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/iterator.html,> everything *should* "just work."
If all you need to do is iterate over the objects pointed to by the
elements of a container of shared_ptrs, then expose the iterators using
one of the functions in that header.
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
More information about the Cplusplus-sig
mailing list