Andrei Alexandrescu wrote:

Prepare to be surprised. Compile this:

void main()
{
    switch (2)
    {
    case (1, 2): break;
    default: break;
    }
}



I'm getting the message that it is impossible to override what is already and expression evaluating to the last in the comma sequence which is not the case as other meanings exist for function calls and templates etc.

Not surprising that it currently picks the default of just the expression in anyway and it would probably be in error if it didn't currently do so.

Reply via email to