[Issue 13196] Infer struct/class template args from constructor args

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jul 24 21:49:10 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13196

--- Comment #5 from Manu <turkeyman at gmail.com> ---
(In reply to Jonathan M Davis from comment #4)
> Regardless, we can potentially make it so that the compiler is able to infer
> the constructor's template arguments for templated types in some basic
> cases, but I think that it's clear that we can only do it for a certain
> subset.

It's not clear at all. Present a case where it can't work? I haven't seen any
yet.

> Ultimately, you need a wrapper function to do the IFTI for you (like
> redBlackTree) if you want to get full IFTI with templated types with
> templated constructors.

Why?
I don't think I understand what you mean. I don't see any reason a wrapper
function is a requirement. Perhaps you mean something by 'full IFTI' which
isn't clear to me?

--


More information about the Digitalmars-d-bugs mailing list