Source File and Position of User Defined Type

Matt via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 11 02:41:09 PDT 2014


On Tuesday, 10 June 2014 at 20:58:41 UTC, Nordlöw wrote:
> Is there a way to, programatically (trait), lookup the source 
> file and position of a user defined type either dynamically or, 
> even better, statically?

I don't know about the source file, per se, but std.traits has 
the fullQualifiedName!() template, which you could go on to parse 
for the package and module of a type. Or just use the packageName 
and moduleName templates instead.


More information about the Digitalmars-d-learn mailing list