[Issue 1659] New: template alias parameters are chosen over all but exact matches.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 10 11:27:35 PST 2007


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

           Summary: template alias parameters are chosen over all but exact
                    matches.
           Product: D
           Version: 2.007
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: spunit262 at yahoo.com


For example say I have a class foo and a class diverged from foo called bar,
and I have a template specialization for foo and a template by the same name
that takes an alias. I instantiate that template with bar and get the alias
version. The spec say that the most specialized version is chosen, but isn't an
alias template the least specialized type of template, even more so than a
unspecialized template that takes a generic type?


-- 



More information about the Digitalmars-d-bugs mailing list