[Issue 1528] [tdpl] overloading template and non-template functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 1 11:48:06 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=1528
--- Comment #22 from timon.gehr at gmx.ch 2013-03-01 11:48:00 PST ---
(In reply to comment #21)
> (In reply to comment #20)
> > (In reply to comment #19)
> > > (In reply to comment #17)
> > > ...
> > >
> > > 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)
> > > ...
> >
> > It can be seen that way. They are ordered from worst to best like this:
>
> More precisely:
>
> MATCHnomatch
> tiargs:MATCHconvert / funarg:MATCHconvert
> tiargs:MATCHconvert / funarg:MATCHconst
> tiargs:MATCHconvert / funarg:MATCHexact
> tiargs:MATCHconst / funarg:MATCHconvert
> tiargs:MATCHconst / funarg:MATCHconst
> tiargs:MATCHconst / funarg:MATCHexact
> tiargs:MATCHexact / funarg:MATCHconvert
> tiargs:MATCHexact / funarg:MATCHconst
> tiargs:MATCHexact / funarg:MATCHexact
>
> Additionally, when comparing normal function and template function matching,
> tiargs MATCH level is treated as equal to funargs level.
Ah, now I see what you mean. You are matching foo!tiargs(funargs).
I was talking about resolving template vs. non-template overloads in the
foo(funargs) setting.
--
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