Is there a “normal” unary logical operator in C++
-
12-11-2019 - |
سؤال
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!
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow