I get this strange error message:
Error: incompatible types for (((long, int)) == ((long, int))): '(long, int)' and '(long, int)'
when compiling this program:
----
import std.typetuple;
template TypeList(T...)
{
alias T toTuple;
}
template snoC(T, alias List)
{
alias TypeList!(List.toTuple, T) snoC;
}
static assert (snoC!(int, TypeList!(long)).toTuple == TypeTuple!(long, int));
----
Comment #1 by clugdbug — 2009-10-29T08:53:55Z
This is a diagnostic bug. The error message is highly misleading. Even this won't compile:
static assert (TypeTuple!(long, int) == TypeTuple!(long, int));
And it *shouldn't* compile, since they are types, not expressions, so they can't be compared with ==. The code should be rewritten as:
static assert (is(snoC!(int, TypeList!(long)).toTuple == TypeTuple!(long, int)));
which compiles. Downgrading from blocker to major.
While investigating this I found bug 3451.
Comment #2 by manuelk89 — 2010-10-11T10:24:49Z
*** Issue 3278 has been marked as a duplicate of this issue. ***