Reduced test case:
struct BigInt {}
alias AliasSeq(T...) = T;
template Tuple(Types)
{
struct Tuple
{
Types expand;
alias field = expand;
}
}
void main()
{
alias Foo = Tuple!BigInt;
Foo[BigInt] cache;
auto x = Foo();
BigInt[] arr;
foreach (y; arr)
cache[y] = x;
}
Comment #3 by k.hara.pg — 2015-10-20T15:32:21Z
(In reply to Kenji Hara from comment #2)
> Reduced test case:
Sorry I was wrong, correct version is:
struct BigInt {}
template Tuple(Types...)
{
struct Tuple
{
Types field;
void opAssign(R)(R rhs)
{
field = rhs.field;
}
}
}
void main()
{
alias Foo = Tuple!BigInt;
Foo[BigInt] cache;
auto x = Foo();
cache[BigInt()] = x;
}