[Issue 3600] New: template instantiation with empty tuple

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 8 01:36:12 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3600

           Summary: template instantiation with empty tuple
           Product: D
           Version: 2.036
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: garick_home_333 at rambler.ru


--- Comment #0 from garick <garick_home_333 at rambler.ru> 2009-12-08 01:36:10 PST ---
string func( A... )( string name, string v )
{
    return "int " ~ name ~ " = " ~ v ~ ";";
}

void main()
{
    writeln( func!( int, long, float )( "val", "10" ) );
    writeln( func!()( "tmp", "77" ) ); // D 2.036 successfully compile this,   
                                       // but not 2.037
    // worked in 2.037
    alias func!() TMP;
    writeln( TMP( "tmp", "77" ) ); 
}

2.037 output:
funcmix.d(13): Error: template funcmix.func(A...) does not match any function
template declaration
funcmix.d(13): Error: template funcmix.func(A...) cannot deduce template
function from argument types !()(string,string)
funcmix.d(13): Error: template instance errors instantiating template

May be because '()' and '()' tuples are incompartible ?
see Issue 3278

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


More information about the Digitalmars-d-bugs mailing list