[Issue 12510] Templated overload ignored

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 3 01:16:50 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12510


Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu


--- Comment #1 from Martin Nowak <code at dawg.eu> 2014-04-03 01:16:47 PDT ---
I think this might be the result of bug 1528. Not sure, but I think the empty
template arguments are matched with MATCHexact, just like a plain function
declaration. And subsequently converting both function arguments to const is
deemed a better match than the template.

You can use this instead.

bool foo (const C lhs, const C rhs)
{
    foo!(C, C)(cast()lhs, cast()rhs);
}

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


More information about the Digitalmars-d-bugs mailing list