[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-cpp-sig
Subject:    Re: [C++-sig] ArgumentError when use the shared_ptr<T>
From:       David Abrahams <dave () boostpro ! com>
Date:       2009-01-27 14:32:23
Message-ID: 871vuo95vs.fsf () mcbain ! luannocracy ! com
[Download RAW message or body]


on Tue Jan 27 2009, ZaeX <zaexage-AT-gmail.com> wrote:

> Thanks, Roman. It solved the problem.
> Can't believe this '&' takes me two days.

Using T const& as a parameter would've worked too.  The thing to remember
with Boost.Python is that a T& parameter has a very special meaning:
there has to be a T hanging around in memory somewhere that your code
can modify.  shared_ptr<X> is conjured up on-the-fly unless you happen
to have one embedded in your Python object.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic