How to write template ModuleOf!T ?

kenji hara k.hara.pg at gmail.com
Wed Dec 15 03:22:16 PST 2010


2010/12/15 Simen kjaeraas <simen.kjaras at gmail.com>:
> kenji hara <k.hara.pg at gmail.com> wrote:
>
>> I think that D should support __traits(isModuleName, ModuleName).
>>
>> Do you think?
>
> A way to traverse the hierarchy of identifiers would be nice.
> There is currently no way to identify an identifier as a template
> or module. I would say is( T == module ) and is( T == template )
> is the way to go, but I'm not entirely sure (they're not types,
> which is what is() deals in).
>
> --
> Simen
>

Even if we can use is(T == module), T should be valid identifier.
Then, we should treat the module name yet not imported as a string.
Therefore, Is-expression will not fit this.

Thanks.


More information about the Digitalmars-d mailing list