Thread overview
[Issue 23360] Template alias to tuple member variable doesn't expand
Sep 22, 2022
Paul Backus
Dec 17, 2022
Iain Buclaw
September 22, 2022
https://issues.dlang.org/show_bug.cgi?id=23360

--- Comment #1 from Paul Backus <snarwin+bugzilla@gmail.com> ---
Note that the following alternatives compile successfully:

---
    // OK - use foo.tuple directly
    AliasSeq!(int) t = foo.tuple;
---


---
    // OK - attach the `this` reference explicitly
    AliasSeq!(int) t = __traits(child, foo, Foo.slice!());
---


...although the __traits(child) workaround fails in the general case, when the tuple has more than one element:

---
alias AliasSeq(Args...) = Args;

struct Foo {
    AliasSeq!(int, int) tuple;
    alias slice() = tuple;
}

void main() {
    Foo foo;
    AliasSeq!(int, int) t = __traits(child, foo, Foo.slice!());
    // Error: expected 2 arguments for `child` but had 3
}
---

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=23360

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 13
https://issues.dlang.org/show_bug.cgi?id=23360

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/20153

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--