This needs to be fixed - ref

Timon Gehr timon.gehr at gmx.ch
Sat Aug 31 06:45:00 UTC 2024


On 8/28/24 17:19, Nick Treleaven wrote:
>> It's astonishing that s.tupleof is a sequence of ref's as you say...
> 
> BTW that was just how I understand `.tupleof`. I see it as (a superset 
> of) a sequence of implicit ref declarations.

Well, but that is not what it is.

```d
alias Seq(T...)=T;

struct S{
     int x;
     alias expand=Seq!x;
}

void main(){
     S s;
     pragma(msg,__traits(isRef,s.tupleof[0])); // false
     pragma(msg,__traits(isSame,s.expand,s.tupleof)); // true
}

```


More information about the Digitalmars-d mailing list