S
semut
Hi, just like to find out when will this operator overload function
gets triggered?
Code Snippet
class A {
public:
enum enA {
A1, A2, A3
} value;
A();
virtual ~A();
A::enA& operator=(const UIScsiimInitReasonCode::enA& );
operator A::enA() {
return(value);
};
friend ostream& operator<< ( ostream&, const A&);
};
I know of the when will operator << and operator = be called, but I am
not sure when will the
operator A::enA() be called and what is the use (beside calling the
operator function directly like
a->operator A::enA()) ?
thanks
gets triggered?
Code Snippet
class A {
public:
enum enA {
A1, A2, A3
} value;
A();
virtual ~A();
A::enA& operator=(const UIScsiimInitReasonCode::enA& );
operator A::enA() {
return(value);
};
friend ostream& operator<< ( ostream&, const A&);
};
I know of the when will operator << and operator = be called, but I am
not sure when will the
operator A::enA() be called and what is the use (beside calling the
operator function directly like
a->operator A::enA()) ?
thanks