← Back to index
|
Original Bugzilla link
Bug 494 – template's variadic argument can't use as type
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-11-11T22:08:00Z
Last change time
2015-06-09T05:15:22Z
Assigned to
bugzilla
Creator
lovesyao
Comments
Comment #0
by lovesyao — 2006-11-11T22:08:58Z
template test(TA...){ const TA[0] test=0; } template test2(TA...){ const TA[0] test2=TA[0].init; } typedef int dummy=0; typedef int myint=3; void main(){ assert(test!(int)==0);//failed assert(test2!(int)==int.init);//failed assert(test2!(myint)==myint.init);//failed assert(test!(int,dummy)==0);//failed assert(test2!(int,dummy)==int.init);//failed assert(test2!(myint,dummy)==myint.init);//failed }
Comment #1
by matti.niemenmaa+dbugzilla — 2006-11-15T02:56:40Z
Fixed DMD 0.174.
Comment #2
by thomas-dloop — 2006-12-23T15:25:45Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
[email protected]
schrieb am 2006-11-12: >
http://d.puremagic.com/issues/show_bug.cgi?id=494
> template test(TA...){ > const TA[0] test=0; > } > > template test2(TA...){ > const TA[0] test2=TA[0].init; > } > > typedef int dummy=0; > typedef int myint=3; > > void main(){ > assert(test!(int)==0);//failed > assert(test2!(int)==int.init);//failed > assert(test2!(myint)==myint.init);//failed > assert(test!(int,dummy)==0);//failed > assert(test2!(int,dummy)==int.init);//failed > assert(test2!(myint,dummy)==myint.init);//failed > } Added to DStress as
http://dstress.kuehne.cn/compile/t/tuple_07_A.d
http://dstress.kuehne.cn/compile/t/tuple_07_B.d
http://dstress.kuehne.cn/compile/t/tuple_07_C.d
Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFjY+lLK5blCcjpWoRAgFXAJ9XYvsX/+sAVbYOVg4UbBOOv71kGQCfX7fI HCjpJqQqRRIqzj/Z3c5LnKQ= =21q6 -----END PGP SIGNATURE-----