Debug prints in @nogc
Cauterite via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 31 11:07:46 PDT 2016
On Wednesday, 31 August 2016 at 16:17:51 UTC, Yuxuan Shui wrote:
> No. When you use assumeUnique, you know something the compiler
> does know, and have to use assumeUnique to tell the compiler
> that (at least when you use it correctly). But when you use
> assumeNogc, it's always because you want to bypass compiler
> checks.
assumeNogc works the same way, you're telling the compiler
something it doesn't know — that the function should be treated
as @nogc. Using assumeNogc on a function that calls the GC is as
unsafe as using assumeUnique on a reference that is not unique.
More information about the Digitalmars-d-learn
mailing list