← Back to index
|
Original Bugzilla link
Bug 296 – Template constant can not be used as size of static array.
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-08-19T07:38:00Z
Last change time
2014-02-15T13:19:06Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
oskar.linde
Comments
Comment #0
by oskar.linde — 2006-08-19T07:38:37Z
template Count() { const Count = 5; } int[Count!()] x; // Error: Count!() is used as a type // can't have associative array key of void
Comment #1
by thomas-dloop — 2006-08-26T06:15:29Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
[email protected]
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-----
Comment #2
by bugzilla — 2006-09-19T15:25:52Z
Fixed in DMC 0.167.