[C++-sig] ArgumentError when use the shared_ptr (original) (raw)

David Abrahams dave at boostpro.com
Tue Jan 27 15:32:23 CET 2009


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 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



More information about the Cplusplus-sig mailing list