[Issue 18119] Allow code that may allocated inside __ctfe condition branches in @nogc functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 24 16:49:25 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18119

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
The suggestion was to make the following condition statements as
specializations.

if (__ctfe) { }
if (!__ctfe) { }

Then, anything in the __ctfe branch that can be evaluated at compile time but
would otherwise cause a GC allocation at runtime would be permissible in @nogc
functions.

--


More information about the Digitalmars-d-bugs mailing list