[Issue 1528] [tdpl] overloading template and non-template functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 1 03:26:54 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=1528



--- Comment #19 from Kenji Hara <k.hara.pg at gmail.com> 2013-03-01 03:26:51 PST ---
(In reply to comment #17)
> > template type parameter deduction without specialization always be MATCHconvert
> 
> AFAIK this is a kludgy implementation detail to make specialization work. The
> last time we worked on that we concluded (with Daniel Murphy?) that there
> should be an additional level between convert and exact. I don't remember the
> details right now, but I'll try to find the relevant discussion.

Are you saying about MATCHdeduced? I had seen the Daniel Murphy's pull request
somewhere, but it is completely unnecessary.

In IFTI, the match level for template arguments and for function arguments are
distinguished. The former is prior than the latter, so there is 3 * 3 + 1 match
level in IFTI.

  For tiargs: exact or const or convert  (3)
  For funargs: exact or const or convert  (* 3)
  noatch (+ 1)

During implementation, I found that the two matching levels had not be
separated correctly (the bug was in
TemplateDeclaration::deduceFunctionTemplateMatch). After fixing the bug, I can
believe that MATCHdeduced is not need anymore.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list