Thread overview
[Issue 12416] New: Template specialization with TemplateTupleParameter incorrect ordering
Mar 19, 2014
John Colvin
Mar 19, 2014
Andrej Mitrovic
Mar 29, 2014
Kenji Hara
March 19, 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@puremagic.com
        ReportedBy: john.loughran.colvin@gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin@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: -------
March 19, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12416


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|                            |WORKSFORME


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2014-03-19 14:10:35 PDT ---
This was fixed in git-head, there was a report already but I can't find it right now.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12416


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |DUPLICATE


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2014-03-28 21:01:13 PDT ---
*** This issue has been marked as a duplicate of issue 2025 ***

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