سؤال

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!

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top