What operator is this code overloading? It doesn't look like the right syntax for the () operator.
class Example
{
public:
operator bool() const;
...
};
It's used to simulate a boolean member variable, like this:
class Container
{
public:
Example ex;
}
void func()
{
Container c;
if (c.ex)
{
...
}
}
Note that ex is used without the parentheses you'd expect from overloading the () operator.