Rust updates
Timon Gehr
timon.gehr at gmx.ch
Tue Jul 17 13:24:48 PDT 2012
On 07/17/2012 07:25 PM, bearophile wrote:
> Walter Bright:
>
>> auto code() { return cast(ushort)42; }
>>
>> works fine. There isn't really a lack here, just some more typing. I
>> just don't see the case coming up hardly at all.
>
> I have just found an example (reduced code):
>
>
> import std.typecons;
> void main() {
> alias Tuple!(ubyte[]) Tu;
> auto x1 = Tu([cast(ubyte)0]); // OK
> auto x2 = Tu([0]); // Error
> }
>
>
> D tuples are very strict.
>
> Bye,
> bearophile
Looks like a bug in std.typecons.Tuple. That constructor shouldn't be
templated on the argument types.
More information about the Digitalmars-d
mailing list