I mean, we all know that there is the negation logical operator !
, and it can be used like this:
class Foo
{
public:
bool operator!() { /* implementation */ }
};
int main()
{
Foo f;
if (!f)
// Do Something
}
Is there any operator that allows this:
if (f)
// Do Something
I know it might not be important, but just wondering!