Issue 17564: Eliminate "static this" for theAllocator#5519
Issue 17564: Eliminate "static this" for theAllocator#5519dlang-bot merged 3 commits intodlang:stablefrom
Conversation
5d25633 to
0d627bf
Compare
wilzbach
left a comment
There was a problem hiding this comment.
LGTM - how about targeting stable, s.t. it's part of the 2.075.0 release?
I originally did that, but then decided on master because it's not a regression. But thinking about it, it would simplify the matching vibe.d fix quite a lot. |
|
Please no enhancements on stable. |
std/experimental/allocator/package.d
Outdated
| @@ -462,8 +462,8 @@ interface ISharedAllocator | |||
| private shared ISharedAllocator _processAllocator; | |||
| IAllocator _threadAllocator; | |||
There was a problem hiding this comment.
Please make this private so people can't access it before it's initialized
Excerpt from Bugzilla:
This sounds more like a blocking issue, not an enhancement ;-) |
This switches to lazy initialization of theAllocator, so that accessing it form within `shared static this` works as expected.
1a0221e to
b8b60fb
Compare
Good reminder. |
CC @CyberShadow - yet another PR that hangs in the queue due to the project tester failures :/ |
This switches to lazy initialization of theAllocator, so that accessing it form within
shared static thisworks as expected.