www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10156] New: Can't handle usage of TypeTuple argument in templated function

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

           Summary: Can't handle usage of TypeTuple argument in templated
                    function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: jcrapuchettes gmail.com



13:43:47 PDT ---
DMD says that it can't deduce template function argument types when the
function is defined with a TypeTuple argument and a variadic template argument.

Example:
---
import std.typetuple;

alias TestT = TypeTuple!(dchar, int);

void main()
{
    test('b', 6, 'a', 54);
}

void test(T...)(const TestT v, const T values)
{
}
---
DMD 2.062 output:
test.d(7): Error: template test.test does not match any function template
declaration. Candidates are:
test.d(10):        test.test(T...)(const TestT v, const T values)
test.d(7): Error: template test.test(T...)(const TestT v, const T values)
cannot deduce template function from argument types !()(char,int,char,int)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 23 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10156


Jonathan Crapuchettes <jcrapuchettes gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



11:37:58 PDT ---
Working in 2.063.2. Thank you!

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