struct X
{
    operator bool () const { return true; }
};

int main()
{
    if (X const& x = X())
    {
        // Whatever...
    }
}
