D implements post-increment/decrement with a lowered expression. According to the docs; (auto t = val, ++val, t) I'm implementing C++'s atomic<T> type, which implements `operator++` & `operator--`, but I realised that the lowering is not atomic, and I seem to have no way to implement the post-inc/dec operators explicitly such that I can make them atomic. To properly implement this library, I need a way to implement the post-int/dec operators explicitly.
Or a way to @disable the post-inc/dec semantics explicitly, so that I can implement pre-inc/dec without opening the door for a race on the lowering.
@thewilsonator updated dlang/dmd pull request #12301 "Fix issue20123 by allowing opUnaryRight to disable post-[inc|dec]rement" fixing this issue: - Fix issue 20123 by allowing opUnaryRight to disable post-[inc|dec]rement https://github.com/dlang/dmd/pull/12301
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19606 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB