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.

Is there any way to define a dispatching type so that it errs or at least announces if the call does not compile?

Reply via email to