Template constraints: opCmp and opUnary!"++"

monarch_dodra monarchdodra at gmail.com
Fri Dec 20 12:42:12 PST 2013


On Friday, 20 December 2013 at 17:48:03 UTC, Philippe Sigaud 
wrote:
> On Fri, Dec 20, 2013 at 6:33 PM, Francesco Cattoglio
> <francesco.cattoglio at gmail.com> wrote:
>
>> Is there any difference between "is(typeof(<somecode>))" and
>> __traits(compiles, <somecode>)?
>
> I find the latter cleaner: its intent is more apparent. I use
> is(typeof()) only for really testing for type existence.

AFAIK, there is no real difference, but "is(typeof())" is more 
"idiomatic" in phobos.


More information about the Digitalmars-d-learn mailing list