[C++-sig] class_, HeldType, and NonCopyable...please help !!

Stefan Seefeld seefeld at sympatico.ca
Fri Mar 4 15:37:53 CET 2005


Nicolas Lelong wrote:

> your problem, I believe (no time to check), is you call_method 
> parameters. I think you have to let BPL know that you don't intend to 
> copy the object by using boost::ref (at least it works for references, 
> once more no time to check for pointers). So this would become :
> 
> virtual void visit(Node* n)  { call_method<void>( self, "visit", 
> boost::ref(n) ); }
> 
> HTH & that i'm too wrong :P

I think your suggestion is on-spot ! Having just browsed the various
tests from the boost python library I experimented with bpl::ptr()
and got it working, too.

Thanks for your help !

Stefan



More information about the Cplusplus-sig mailing list