C++ guys hate static_if?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Mar 14 15:20:46 PDT 2013


On 3/14/13 6:15 PM, Walter Bright wrote:
> On 3/14/2013 3:02 PM, H. S. Teoh wrote:
>> Under a concepts system, this would be caught early because the compiler
>> would detect a concept mismatch (Unqual!T != T) when analysing the
>> template code.
>
> How would that be different from simply adding a template constraint?

The difference is without the constraint there's no error. It's all 
about the default: by default (no constraints) everything is allowed.

Andrei




More information about the Digitalmars-d mailing list