Feature request: __traits(canInstantiate), like __traits(compiles) but without suppressing syntax errors

Atila Neves atila.neves at gmail.com
Wed Jan 22 15:53:15 UTC 2020

On Wednesday, 15 January 2020 at 18:13:08 UTC, H. S. Teoh wrote:
> On Wed, Jan 15, 2020 at 03:13:08PM +0000, FeepingCreature via 
> Digitalmars-d wrote:
>> Right now it's impossible to check "is there a valid 
>> (template) specialization for this function call" without also 
>> saying "and by the way, if there's a syntax error in the 
>> function, suppress the error and return false."
>> This makes many Phobos and library functions very annoying to 
>> use.
> Yeah, the error-gagging method of speculative template 
> instantiation has been costing me lots of wasted time, too,

I've somehow only just discovered that `-verrors=spec` is a thing 
that one can pass to dmd. Does that help?

More information about the Digitalmars-d mailing list