[Issue 15320] static assert(__traits(compiles, xyz)) considered harmful

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 12 05:41:58 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15320

--- Comment #4 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to John Colvin from comment #3)
> (In reply to Andrei Alexandrescu from comment #2)
> > (In reply to John Colvin from comment #1)
> > > You just mean in unittests, right? It's useful (necessary?) elsewhere.
> > 
> > Yah, unittests were the only use case I had in mind. What are others?
> 
> template constraints, sanity checks, only way of implementing some template
> predicates (IIRC it appears quite a bit in std.range and std.traits for
> this).

Nice. Yah, those would stay as they are.

--


More information about the Digitalmars-d-bugs mailing list