www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2296] New: Function template parameterization on fixed array size does not work

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

           Summary: Function template parameterization on fixed array size
                    does not work
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: andrei metalanguage.com


The test says it all:

void f(uint D)(int i[D]...)
{
}

void main()
{
    f(1, 2, 3);
}


-- 
Aug 19 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2296


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
         OS/Version|Linux                       |All
            Summary|Function template           |IFTI with parameterization
                   |parameterization on fixed   |on fixed array size does not
                   |array size does not work    |work
            Version|unspecified                 |1.036




------- Comment #1 from smjg iname.com  2008-11-24 09:41 -------
(In reply to comment #0)
 The test says it all:

No it doesn't. It doesn't tell anybody what happens when you try this code. bz2296.d(7): template bz2296.f(uint D) does not match any template declaration bz2296.d(7): template bz2296.f(uint D) cannot deduce template function from argument types (int,int,int) --
Nov 24 2008