http://d.puremagic.com/issues/show_bug.cgi?id=1528
--- Comment #30 from Kenji Hara <[email protected]> 2013-03-15 07:27:23 PDT --- (In reply to comment #29) > (In reply to comment #28) > > (In reply to comment #26) > > > > It's not about the polysemous literals. > > What's irritating me is that a function call with conversion > > is preferred over a function template instantiation with > > exact arguments. > > > > int f3(long) { return 1; } > > int f3(T)(T) { return 2; } > > > > int v = 2; > > f3(v); > > > > MATCHexact / MATCHconvert vs. > > MATCHconvert / MATCHexact > > IMO the second should be MATCHexact / MATCHexact. No. type parameter deduction is less specialized than matching to explicitly specialized type parameter. void foo(T)(T) {} // generic version void foo(T:int)(T) {} // specialized to int foo(1); // calls T:int version That is why f3(v) makes MATCHconvert / MATCHexact with template version. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
