@nogc and Phobos
bomat
Tempest_spam at gmx.de
Sat Mar 11 15:59:45 UTC 2023
Thanks for the responses everyone, that was all very helpful and
got me on the right track.
Especially this:
On Saturday, 11 March 2023 at 14:41:01 UTC, Steven Schveighoffer
wrote:
> I think it is an error to mark a library which centers on
> callbacks with always being @nogc. You can work around nothrow
> and @safe, but not @nogc.
Turns out it was my fault. I was working off example code that
came with d-imgui, and the original author took the (rather lazy)
approach of wrapping the entire main loop into `nothrow @nogc:` I
just got rid of that and only marked the callbacks accordingly.
Now I can just set status data in the callbacks, then handle it
in the main loop.
Sorry, still kinda finding my feet here. :)
More information about the Digitalmars-d-learn
mailing list