predefined version for "nogc" option

a11e99z black80 at bk.ru
Tue Sep 3 09:52:03 UTC 2019


On Tuesday, 3 September 2019 at 08:18:13 UTC, Kagamin wrote:
> __traits(compiles,new int)

it doesn't work
https://run.dlang.io/is/zdD2cU

2 version of runtime exists:
- at compiletime when compiler/ctfe can use all features.
- and app runtime when constraints can exist such as no GC, no 
exceptions..

what exactly __traits(compiles) checks "can this code compile 
without any conditions?" ?
maybe need another trait "rtcompiles" to take into account 
current options/conditions?


More information about the digitalmars-d-ldc mailing list