J
jason.cipriani
If I have:
class Something {
public:
bool operator ! () const;
};
Then I can do:
Something s(...);
if (!s) ...;
My question is, what operator do I need to overload if I want to be
able to define the behavior of this instead:
Something s(...);
if (s) ...; // <-- notice no !
Sorry if the post title was stupid, I couldn't think of a better one.
Thanks,
Jason
class Something {
public:
bool operator ! () const;
};
Then I can do:
Something s(...);
if (!s) ...;
My question is, what operator do I need to overload if I want to be
able to define the behavior of this instead:
Something s(...);
if (s) ...; // <-- notice no !
Sorry if the post title was stupid, I couldn't think of a better one.
Thanks,
Jason