Is this a new bug ?
Newbie2019
newbie2019 at gmail.com
Sat Jul 20 05:21:01 UTC 2019
On Saturday, 20 July 2019 at 04:18:15 UTC, Adam D. Ruppe wrote:
> show me what you're doing now and I'll see which case it is.
> Most the time I see these, the code is significantly simplified
> and bugs fixed by removing the usages of these strings..
I want to do this in betterC:
template asPure(string P, alias Fn) if
(isFunctionPointer!(typeof(&Fn))) {
enum N = __traits(identifier, Fn);
enum string asPure = "private alias " ~ N ~ "_P = " ~
typeof(&Fn).stringof ~ " pure;\n" ~ "__gshared immutable " ~ N ~
"_P " ~ P ~"= cast(" ~ N ~ "_P) &" ~ N ~ " ;" ;
}
More information about the Digitalmars-d-learn
mailing list