Is there any way to define a dispatching type so that it errs or at least announces if the call does not compile?
If I define an opDispatch for something, but the call does not
compile, the compiler currently behaves as if the opDispatch
didn't exist at all. Just like C++ templates as far as I know.
Why is this? I think it would be better if it acted like other D
templates: Compilation failure is always an error, but you can
use preconditions if you want the "substitution failure is not an
error"-idiom. This would be better to detect errors.
- Why opDispatch uses SFINAE implicitly? Dukc via Digitalmars-d
- Re: Why opDispatch uses SFINAE implic... Stefan Koch via Digitalmars-d
- Re: Why opDispatch uses SFINAE im... Dukc via Digitalmars-d
- Re: Why opDispatch uses SFINA... Dukc via Digitalmars-d
- Re: Why opDispatch uses S... Dukc via Digitalmars-d
- Re: Why opDispatch uses SFINAE implic... Adam D. Ruppe via Digitalmars-d
- Re: Why opDispatch uses SFINAE im... Dukc via Digitalmars-d
