[Issue 20010] New: allow cast of type, not only expressions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 29 10:14:30 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20010
Issue ID: 20010
Summary: allow cast of type, not only expressions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
People write stuff like :
mixin("alias Func = " ~ typeof(&impl).stringof ~ " pure nothrow;");
to set the attributes of a function. We could have something like
alias Func = cast(pure nothrow) typeof(&impl);
or even using the TypeCtor style
alias Func = pure(nothrow(typeof(&impl)));
This probably requires a DIP but I open an issue to keep track of the idea.
--
More information about the Digitalmars-d-bugs
mailing list