On Wed, 24 Dec 2014 00:16:33 +0000 aldanor via Digitalmars-d <[email protected]> wrote:
> alias T = Tuple!(int, "a", double, "b");
> T foo = [1, 2]; // works
> T bar;
> bar = [1, 2]; // doesn't?
>
> Wonder if there's an obvious reason to this?
as for "why it's not working"... i honestly don't know. adding simple
`opAssign` overload to Tuple struct solves it:
void opAssign(U, size_t n)(U[n] values)
if (n == Types.length && allSatisfy!(isBuildableFrom!U, Types))
{
foreach (i, _; Types)
{
field[i] = values[i];
}
}
i guess that this was simply overlooked, so i think that you can create
ER for this.
signature.asc
Description: PGP signature
