[C++-sig] ArgumentError when use the shared_ptr (original) (raw)
David Abrahams dave at boostpro.com
Tue Jan 27 15:32:23 CET 2009
- Previous message: [C++-sig] ArgumentError when use the shared_ptr
- Next message: [C++-sig] Boost Pro Python Version
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [C++-sig] ArgumentError when use the shared_ptr
- Next message: [C++-sig] Boost Pro Python Version
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]