[Issue 582] New: Cannot slice mixed tuples
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 21 14:18:01 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=582
Summary: Cannot slice mixed tuples
Product: D
Version: 0.174
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: rejects-valid, spec
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: daekharel at gmail.com
template Tuple(E ...) { alias E Tuple; }
alias Tuple!(float, float, 3) TP;
alias TP[0..length-1] TQ;
DMD gives following error when compiling the above:
err.d(4): tuple E is used as a type
err.d(4): Error: can only slice tuple types, not void
This doesn't exactly contradict the spec (AFAIK), which is a little vague about
using tuples outside of templates, but it does directly contradict the essay at
http://www.digitalmars.com/d/tuple.html, which in fact uses this as an example.
--
More information about the Digitalmars-d-bugs
mailing list