Template constraints error messages using cputs()

BCS none at anon.com
Sat Aug 7 16:46:38 PDT 2010


Hello bearophile,

> When a template constraint is composed of some different parts in &&,
> it's less easy to understand what condition has failed, so I miss the
> error messages written by me.
> 

One solution to this issue would be to have an unconstrained temple that 
contains nothing but prgam(msg,"...") inside static ifs. That way failing 
the constraint produces a nice message and then, because the template has 
nothing it it, using it for almost anything will generate an error and block 
compilation.

-- 
... <IXOYE><





More information about the Digitalmars-d mailing list