Why can't typeof() be used in member method?

Temtaime via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 26 15:33:06 PDT 2017


On Wednesday, 26 July 2017 at 19:06:24 UTC, Andre Pany wrote:
> On Wednesday, 26 July 2017 at 17:04:59 UTC, Adam D. Ruppe wrote:
>> On Wednesday, 26 July 2017 at 16:50:35 UTC, Andre Pany wrote:
>>> [...]
>>
>> FYI, you shouldn't use .stringof here. Just use `T` instead of 
>> `T.stringof`.
>>
>> [...]
>
> Thank you so much!
>
> Kind regards
> André

There's another method for such a check.

mixin(`static if (!is(typeof(T.`~p.name~`))))



More information about the Digitalmars-d-learn mailing list