Bug 938 – struct with Tuple

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-02-07T12:29:00Z
Last change time
2014-02-16T15:25:44Z
Assigned to
bugzilla
Creator
Daniel919

Comments

Comment #0 by Daniel919 — 2007-02-07T12:29:00Z
Hi, dmd crashes on compiling this: ------------------------------------------------------ import std.stdio; struct Tuple(A...) { alias A Tuple; } template removeSpace(char[] s, int x = 0) { static if (s[0] == ' ') alias removeSpace!(s[1..$], x+1) removeSpace; else alias Tuple!(s, x) removeSpace; } void main() { alias removeSpace!(" Hello you !") TP; writefln(TP.Tuple[0]); } ------------------------------------------------------
Comment #1 by thomas-dloop — 2007-04-06T06:29:04Z