www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10969] New: Variadic template parameter re-use in function signature

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10969

           Summary: Variadic template parameter re-use in function
                    signature
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: john.loughran.colvin gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin gmail.com> 2013-09-05
10:31:58 BST ---
template A(T, U...)
  {
      alias A = T;
  }

  void foo(T, U...)(A!(T, U) a){}

  foo!(int, float)(3);

/d53/f246.d(9): Error: template D main.foo does not match any function template
declaration.
    Candidates are: /d53/f246.d(7): f246.main.foo(T, U...)(A!(T, U) a) 
/d53/f246.d(9): Error: template f246.main.foo(T, U...)(A!(T, U) a) cannot
deduce template function from argument types !(int, float)(int) 
/d53/f246.d(9): Error: template instance foo!(int, float) errors instantiating
template


This also fails:

  template A(T, U)
  {
      alias A = T;
  }

  void foo(T, U...)(A!(T, U[0]) a){}

  foo!(int, float)(3);

/d746/f639.d(9): Error: template D main.foo does not match any function
template declaration. 
    Candidates are: /d746/f639.d(7): f639.main.foo(T, U...)(A!(T, U[0]) a) 
/d746/f639.d(9): Error: template f639.main.foo(T, U...)(A!(T, U[0]) a) cannot
deduce template function from argument types !(int, float)(int) 
/d746/f639.d(9): Error: template instance foo!(int, float) errors instantiating
template

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 05 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10969


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-09-05 02:58:28 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2526

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 05 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10969



--- Comment #2 from github-bugzilla puremagic.com 2013-10-01 04:18:55 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/da93bfdf9021b832ff40512e6910600e753755a3
fix Issue 10969 - Variadic template parameter re-use in function signature

https://github.com/D-Programming-Language/dmd/commit/57ea22827f40b128fcc9aad16882a3ab2184d7fd
Merge pull request #2526 from 9rnsr/fix10969

Issue 10969 - Variadic template parameter re-use in function signature

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 01 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10969


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

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


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