add std.typecons.Typedef.toHash()

Thanks for your mail.
when I've update my dmd and druntime, I found that the problem was solved!
then I update my pull request.


Thanks a lot!!



----- Original Message -----
>From: H. S. Teoh <notifications@github.com>
>To: D-Programming-Language/phobos <phobos@noreply.github.com> 
>Cc: garlic-flavor <sweatygarlic@yahoo.co.jp>
>Date: 2014/11/13, Thu 13:55
>Subject: Re: [phobos] add std.typecons.Typedef.toHash() (#2586)
> 
>
>In std/typecons.d:
>> +            bool opEquals(ref const MyStruct2 r) const { return r.x == x; }
> +        }
> +
> +        alias TD = Typedef!MyStruct2;
> +        int[TD] td;
> +        td[TD(MyStruct2(50))] = 5;
> +        assert(td[TD(MyStruct2(50))] == 5);
> +    }
> +
> +    // SEGV
> +    // {
> +    //     class MyClass{}
> +    //     alias TD = Typedef!MyClass;
> +    //     int[TD] td;
> +    //     auto c = new MyClass;
> +    //     td[TD(c)] = 6; //<----------------- 
>It would be nice to track down the cause of this problem.
>$B!=(B
>Reply to this email directly or view it on GitHub.
>
>