[ERROR]
A user-defined conversion cannot specify a return type.
class A {
public:
int operator int() {return value;}// error
operator int() {return value;} // ok
private:
int value;
}
Do not specify a return type before the operator keyword.