[Issue 494] New: template's variadic argument can't use as type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 11 20:09:02 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=494
Summary: template's variadic argument can't use as type
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: lovesyao at hotmail.com
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
}
--
More information about the Digitalmars-d-bugs
mailing list