Tuples in LDC - why it does this?

arandomonlooker shdkahdkhhhhhii at gmail.com
Tue Jun 14 03:19:16 UTC 2022


On Tuesday, 14 June 2022 at 03:15:50 UTC, rikki cattermole wrote:
>
> Works in both with -betterC as per spec:
>
> ```d
> import std.typecons;
> import std.meta;
>
> Tuple!(int, int, int) iAMfunction() {
>     return tuple(1, 2, 3);
> }
>
> extern(C) int main() {
>     int a, b, c;
>     AliasSeq!(a, b, c) = iAMfunction();
>     return 0;
> }
> ```

Thank you. I'm a newbie to the language, i make a lot of mistakes 
with it, as you can see.


More information about the digitalmars-d-ldc mailing list