[Issue 12416] New: Template specialization with TemplateTupleParameter incorrect ordering

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 19 14:07:32 PDT 2014


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

           Summary: Template specialization with TemplateTupleParameter
                    incorrect ordering
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: john.loughran.colvin at gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2014-03-19 21:07:30 GMT ---
template Foo(T)         { pragma(msg, "1"); }
template Foo(A ...)     { pragma(msg, "4"); }

alias foo1 = Foo!(int);

This prints 4, not 1. This is wrong according to the docs:

"If both a template with a tuple parameter and a template without a tuple
parameter exactly match a template instantiation, the template without a
TemplateTupleParameter is selected."

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