Refactor core.atomic : cas into a two-level template#3095
Refactor core.atomic : cas into a two-level template#3095dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @Geod24! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3095" |
|
@TurkeyMan : Alright I have to admit when I started refactoring this I missed the point that this was essentially both compare-and-set and compare-and-exchange (as in, Combining this with templates leads to a very unintuitive API IMO. Things blew up for me when I tried to use compare-and-set with pointers (basically initializing a |
|
This is terrifying. Does argument inference work exactly the same with this arrangement? I don't have time right now to think this through, but I'd like the opportunity to understand this before it's merged. |
As long as one does not explicitly specify the type of arguments, and relies on IFTI, everything works the same. This pattern is very helpful when one needs to have some template parameters part of the interface and others not.
Any chance you could give it a look now ? |
|
Ping @TurkeyMan |
|
The change to a two-level template will cause any existing fully-parameterized uses of |
Indeed but fully-parameterized cases of IFTI is not usually something we cater for, unless there's a special-case for |
|
Ping @TurkeyMan |
|
I don't see documentation indicating to library users that |
|
Well it's been more than 72h so adding |
This should reduce the amount of boilerplate needed in the implementation, and hopefully make the code easier to read for everyone.
|
I don't know what's up with FreeBSD... It doesn't seem spurious, however this was seen in other unrelated PR. Will investigate next week. |
I want to see how it shows up in the doc though, before we merge this.