Boost logo

Boost Users :

Subject: Re: [Boost-users] [python] Passing pointers as arguments without copying.
From: Diederick C. Niehorster (dcnieho_at_[hidden])
Date: 2009-09-26 01:07:49


I don't know about the whole boost::noncopyable, but if you dont want
to pass a copy of the class, doesn't a reference/pointer do th trick?

On Sat, Sep 26, 2009 at 7:36 AM, Germán Diago <germandiago_at_[hidden]> wrote:
> Hello. The question is simple, but reading the documentation I cannot
> understand how
> to do this:
>
>
> class MyClass : boost::noncopyable {
>    void f(MyClass2 * c2);
> };
>
> MyClass2 is not copyable either. So I want to
> be able to wrap that function, but avoid the copying of
> MyClass2 when called from python. I want to pass the c++
> object directly, not a copy of it.
>
> I'm not sure if this can be done with ptr() or some kind of call policy,
> but I don't understand the documentation 100%.
> Any help will be appreciated. Thanks.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net