[Issue 18422] String members and parameters cannot be mixed in, even during CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 13 02:28:59 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18422
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #8 from hsteoh at quickfur.ath.cx ---
It's a bit ironic, but perhaps reading this might help explain why what you
proposed doesn't work:
https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time
OTOH, why not just make the module name a template parameter? That would
sidestep the issue:
----
struct Module(string name)
{
string[] allMembers() {
enum impl = __traits(allMembers, name);
return impl;
}
}
----
--
More information about the Digitalmars-d-bugs
mailing list