data pulverizer wrote:

In this case would like to use the ConstOf specialisation instead of the default implementation for the inputs which are const.

actually, second template is uninstantiable at all. you want to do type deconstruction at instantiation, and that doesn't work.

i.e. what your code wants to do (as it is written) is to have `T` in second template to be equal to `double`. you cannot deconstruct the type like that in template. what you *can* do, though, is this:

 auto max(T)(const(T)* x, const(T)* y)

this way it will select your second template.

Reply via email to