if you attempt to return a Voldemort type that defines value or index as a function, or stores it in a struct when you call for each you get an error like auto front{ struct dataaccess{ int index; T value; } return dataacess(start,data[start]); } >Error: cannot infer argument types, expected 1 argument, not 2 It seems to require exactly an std.tuple, and the spec should say as much or clarify how it works
it is a compiler-tuple it needs. std.tuple has alias this to a compiler-tuple. this is the same as any other function call. compiler-tuples can expand to argument lists.
Fixed (in https://github.com/dlang/dlang.org/pull/3204): https://dlang.org/spec/statement.html#front-seq