On 9/11/13 2:53 PM, bearophile wrote:
Timothee Cour:
Currently D will compile templated code that is syntactically correct but
semantically always incorrect (ie regardless of template parameters), eg
the following:
regardless of T, b is not in scope and hence this template cannot be
instantiated without CT error.
So would it be possible to detect such kind of errors (ie CT error
regardless of template params) without having to instantiate the
template?
There was a discussion about related matters, and there is an
enhancement request on this in Bugzilla. Andrei was against it, but lot
of other people, me and perhaps Walter too have appreciated the idea.
Bye,
bearophile
I'm not against it, but I find it a very small improvement. Its user
base is exactly people who want to write and deploy a template without
ever testing it at all, ever. I have a hard time catering to that
hypothetical crowd.
Andrei