On Wednesday, 4 January 2017 at 16:06:11 UTC, Stefan Koch wrote:
On Wednesday, 4 January 2017 at 08:45:59 UTC, Eyal Lotem wrote:
On Tuesday, 3 January 2017 at 09:44:38 UTC, Stefan Koch wrote:
I think that I can provide a dmd patch that would allow the
casts you want at ctfe.
However I would not propose it for inclusion myself.
A cast that only fiddles with function attributes like @nogc
should be perfectly safe, shouldn't it?
Honestly I am not sure about it.
I guess I could enable this back-door for you and others.
This back-door already exists, see e.g.:
https://github.com/nordlow/phobos-next/blob/master/src/dbgio.d#L13
and
http://forum.dlang.org/post/[email protected]
Patch will follow in the next days, I am not sure if it will be
merged though.
There is assumeWontThrow
(https://dlang.org/phobos/std_exception.html#.assumeWontThrow) in
std.exception, so I think the chances for assumeNogc or
assumePure aren't that bad ;-)