www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 296] New: Template constant can not be used as size of static array.

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

           Summary: Template constant can not be used as size of static
                    array.
           Product: D
           Version: 0.164
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: oskar.linde gmail.com


template Count() { const Count = 5; }

int[Count!()] x; 
// Error: Count!() is used as a type
// can't have associative array key of void


-- 
Aug 19 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-08-19:
 http://d.puremagic.com/issues/show_bug.cgi?id=296
 template Count() { const Count = 5; }

 int[Count!()] x; 
 // Error: Count!() is used as a type
 // can't have associative array key of void
Added to DStress as http://dstress.kuehne.cn/compile/t/template_43_A.d http://dstress.kuehne.cn/compile/t/template_43_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFE8DOdLK5blCcjpWoRAvzWAJ9eEfwxqeH0GCtqM1R79Ua2P1KR2ACfTVam uzQZRODhjP3s1toahniaGx8= =isqS -----END PGP SIGNATURE-----
Aug 26 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=296


bugzilla digitalmars.com changed:

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





Fixed in DMC 0.167.


-- 
Sep 19 2006