[Issue 6322] IFTI doesn't support static arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 8 21:11:43 PDT 2013


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


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

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


--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2013-04-08 21:11:37 PDT ---
(In reply to comment #0)
> void f(T: T[n], size_t n)(T[n] t) { }
> 
> void main()
> {
>     int[2] a;
>     f!(typeof(a))(a); //this compiles
>     f(a); //this doesn't
> }

The template function never called with IFTI, because:
1. T is deduced to int from the argument 'a'.
2. T is tested with specialized signature `: T[n]`. But T is int, so never
match.

Although it looks weird behavior, it is not a bug.

-- 
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