On Friday, 25 April 2014 at 11:51:48 UTC, bearophile wrote:
They are not the same type:


void main() {
    import std.typecons: Tuple;
    alias T1 = const Tuple!(int, int);
    alias T2 = Tuple!(const int, const int);
    static assert(is(T1 == T2)); // Fails.
}


This type difference causes some troubles when you use tuples.

Bye,
bearophile

Why would you even expect those to be same types? These 2 types are also different:

struct A
{
    const int x;
}

alias A_ = const(A);

Reply via email to