Compile time sequences
drug
drug2004 at bk.ru
Thu Oct 4 11:50:26 UTC 2018
04.10.2018 14:44, drug пишет:
> I was incorrect with description of the problem. The problem is that
> there is no simple way to distinct types and symbols if symbols are
> private. Because private symbol is not accessible you can not get any
> info on it, including is it type or symbol or value. And you can not get
> protection for types and values, because they have no protection at all.
> So you can not get protection for types and values and can not check if
> alias is type, value and symbol because it is private/protected. Vicious
> circle.
>
> Specific case https://run.dlang.io/is/CAoxXO
>
> Honestly, if `isType` can recognize private members the problem would be
> solved. But I think `isSymbol` and `isValue` (working with private
> members) will make situation more consistent.
>
>
> Current workaround with fields is using FieldNameTuple. But I fails to
> work around private enums.
>
I forget about scope in static foreach, this correct
version:https://run.dlang.io/gist/97294d89d5c0b89ebcf009c18c4743d4
More information about the Digitalmars-d-learn
mailing list