[Issue 3377] [tdpl] static foreach should be implemented
Christopher Wright
dhasenan at gmail.com
Thu Oct 8 15:49:29 PDT 2009
d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=3377
>
>
> downs <default_357-line at yahoo.de> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |default_357-line at yahoo.de
>
>
> --- Comment #1 from downs <default_357-line at yahoo.de> 2009-10-08 12:35:53 PDT ---
> This does compile (on 1.0):
>
> template Repeat(T, int I) {
> static if (!I) alias Tuple!() Repeat;
> else alias Tuple!(T, Repeat!(T, I - 1)) Repeat;
> }
downs, you are a genius. You can create code that is both elegant and
dreadful. You make the world a more interesting place.
More information about the Digitalmars-d-bugs
mailing list