Compile time check for GC?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Jan 26 13:10:54 UTC 2021
Is there some way for library authors to test whether a GC is
present at compile time? @nogc just means that my code does not
depend on a GC, but it doesn't tell the compiler that my code is
incompatible with GC.
I want to compute pointers in a way that is not scannable by a
conservative collector for performance reasons. So I need to make
sure that the faster code isn't chosen when people use GC using
"static if"s.
More information about the Digitalmars-d-learn
mailing list