[C++-sig] [pyplusplus] functions returning double&

Benjamin Koerner bennie.koerner at web.de
Sat Jun 13 20:09:05 CEST 2009


How can one allow Py++ to handle member functions that return a reference to an immutable type?

For example this X::getval function:
class X{
double xval;
public:
  double& getval(){return xval;}
}; 

I don't care about the reference. All I need is the double value, which is only used as an r-value. Can one use a call policy in this situation, or does one have to write custom wrapper code?

Regards,
Bennie
____________________________________________________________
Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de



More information about the Cplusplus-sig mailing list