January 02, 2007 Tuple + foreach | ||||
---|---|---|---|---|
| ||||
import std.stdio; template Print(A ...) { void print() { foreach(byte a; A) { writefln(a); } } } void main() { Print!(1,'a',"str",6.8).print(); } dmd compiles this code with no error. Shouldn't it be an error to declare a as byte? |
Copyright © 1999-2021 by the D Language Foundation