[Issue 9711] extend IFTI to deduce static array length

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 13 15:16:46 PDT 2013


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


Zhenya Chapovsky <zheny at list.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zheny at list.ru


--- Comment #1 from Zhenya Chapovsky <zheny at list.ru> 2013-03-13 15:16:45 PDT ---
[1,2,3] seems is dynamic allocated array,so typeof([1,2,3]) == int[]

but

auto deduceLength(T,size_t n)(T[n] a){ return a; }
enum int[3] a = [1,2,3];
static assert(is(typeof(deduceLength(a))==int[3])); // pass

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