[Issue 18569] std.traits.moduleName problem with enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 7 15:13:18 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18569
--- Comment #1 from Claude <claudemr at live.fr> ---
Actually it is not certain that is a Phobos problem, as replacing the
moduleName template within std.traits by that reduced code:
template moduleName(alias A)
{
// __traits(parent) returns "module modName"
// so we just retreive "modName"
enum moduleName = (__traits(parent, A).stringof)[7 .. $];
}
... leads to a wrong result (ignoring the fact package names are not prepended
to the module name in that code of course, which is not the issue here anyway).
--
More information about the Digitalmars-d-bugs
mailing list