[C++-sig] Casting operator issue

Coockie_jr achille.talon at gmail.com
Wed Jul 4 16:26:21 CEST 2007


Hi!
I'm currently wrapping a library and I'm having some problems wth call
policies.
Here is my peace of code that is causing an error.

class A
{
public:


        virtual char* toString() = 0;
	operator char*(){return toString();}
};

py++ gives me the following warning:


Warning: char* A::operator char*() [casting operator]
W1050 = The function returns "%s" type. You have to specify a call policies
Be sure to take a look on Py++ defined call policies:
http://language-binding.net/pyplusplus/documentation/functions/call_policies.html#py-defined-call-policies

I checked the tutorials but I can't figure out how to define a call policy
for this case...

Thank for your help.

-- 
View this message in context: http://www.nabble.com/-C%2B%2B-sig--Casting-operator-issue-tf4024690.html#a11431776
Sent from the Python - c++-sig mailing list archive at Nabble.com.




More information about the Cplusplus-sig mailing list