www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12416] New: Template specialization with TemplateTupleParameter incorrect ordering

reply d-bugmail puremagic.com writes:
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: -------
Mar 19 2014
next sibling parent d-bugmail puremagic.com writes:
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: -------
Mar 19 2014
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Mar 28 2014