[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 14 13:58:39 PDT 2010


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



--- Comment #4 from Tomasz Sowiński <tomeksowi at gmail.com> 2010-03-14 13:58:37 PDT ---
(In reply to comment #3)
> Is this useful?
> 
> struct Matrix {
>     Matrix opOpAssign(string op, T:real)(T a);
>     Matrix opOpAssign(string op, T:Matrix)(T m);
> }

It is, thanks. Still, it'd be a lot cleaner to do without dummy template
params... Is there some bigger problem that prevents the compiler to look at
both template and runtime params when resolving templated function overloads?
I'm guessing that it currently matches only against template signatures and
bails out upon ambiguity.

-- 
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