Thread overview
[Issue 18969] 'need this for <function>' when passing field or method as template parameter
Jun 20, 2018
Simen Kjaeraas
Dec 17, 2022
Iain Buclaw
Mar 08, 2023
RazvanN
June 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18969

--- Comment #1 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
Related:

import std.meta : Alias;
alias getMember(alias T, string name) = Alias!(__traits(getMember, T, name));

struct S {
    int i = 0;
}

unittest {
    S s;
    getMember!(s, "i") = 2;
}

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
March 08, 2023
https://issues.dlang.org/show_bug.cgi?id=18969

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> ---
I cannot reproduce this. Closing as WORKSFORME. Please reopen if I am missing something.

--