Thread overview |
---|
February 12, 2007 [Issue 954] New: Recursive templates with values, Error: T is used as a type | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=954 Summary: Recursive templates with values, Error: T is used as a type Product: D Version: 1.005 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: lio@lunesu.com template Foo( char C ) { const Foo = true; } template Bar(char[] T, int F ) { const Bar = Foo!(T[F]); //line 7 } static assert( Bar!("asd",1) ); Results in: t.d(7): Error: T is used as a type t.d(7): template instance Foo!(void[1]) does not match any template declaration t.d(7): variable t.Bar!("asd",1).Bar voids have no value Workaround: change the reference to F in that line to "F+0" -- |
February 12, 2007 [Issue 954] Recursive templates with values, Error: T is used as a type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=954 ------- Comment #1 from lio@lunesu.com 2007-02-12 07:21 ------- Forgot to emphasize: direct references to T[F] work fine, for example: template Foo(char[] T, int F) { const Foo = T[F]; } -- |
April 06, 2007 [Issue 954] Recursive templates with values, Error: T is used as a type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=954 thomas-dloop@kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Windows |All ------- Comment #2 from thomas-dloop@kuehne.cn 2007-04-06 06:29 ------- Added to DStress as http://dstress.kuehne.cn/compile/t/template_59_A.d http://dstress.kuehne.cn/compile/t/template_59_B.d -- |
March 09, 2009 [Issue 954] Recursive templates with values, Error: T is used as a type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=954 lio+bugzilla@lunesu.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from lio+bugzilla@lunesu.com 2009-03-08 20:54 ------- This seems to have been fixed in version 1.030 -- |
Copyright © 1999-2021 by the D Language Foundation