[C++-sig] Wrapping method that returns const int& (boost::python)

Stefan Seefeld seefeld at sympatico.ca
Tue Oct 26 01:51:49 CEST 2010


  Panos, Erik,

the issue here is likely that Python's "int" objects are immutable. 
Therefore, you can't pass around ints by reference, only by-value. If 
the compiler is confused, perhaps you need to explicitly set a 
return-value policy that makes this clear ?

     Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list