On 2013-03-28 15:16, Steven Schveighoffer wrote:

Like Timon said, it's a bug in inout design.

I'm not sure what __aggr1174 is, but you can fix the e error by
specifying the type for e (or specifying it as const).

I'm assuming the issue is that the compiler is trying to generate a
struct to hold the stack data for foo, and struct members cannot be inout.

It is a difficult problem to solve, because inout has two meanings
depending on whether it is a parameter/return or a local variable.  At
some point, we need to address this, because inout has so much
potential, but suffers from some large deficiencies.

I had to change to a regular for-loop and declare the element as "const":

for (size_t i = 0; i < arr.length; i++)
{
    const e = arr[e];
}

--
/Jacob Carlborg

Reply via email to