On 11/6/2012 9:52 AM, bearophile wrote:
// Case3 (uncommon) void main() { auto data = [0, 1, 2, 3]; foreach (@copy x; data) writeln(++x); }
x is a value type, and it is already copied. And if you did want to copy it, foreach (x; data) { auto copy = x; writeln(++copy); } I don't see what the annotation buys you, even if it could be made to work.