On 12.03.2016 08:58, deadalnix wrote:


IMO, this *should* compile and infer T == const(SomeStruct) as the
common type of a and b.  But I'm not sure whether or not this is a
regression.


T

More tricky actually.

If T has indirection, then that is the correct answer. If not, the T ==
SomeStruct.

Actually the documentation currently special-cases pointers and arrays:
"The deduced type parameter for dynamic array and pointer arguments has an unqualified head:"

http://dlang.org/spec/template.html#function-templates

Reply via email to