Bug 17802 – allocatorObject doesn't set the passed allocator when it has state into impl field of CAllocatorImpl

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-09-03T16:47:08Z
Last change time
2024-12-01T16:30:46Z
Assigned to
Eduard Staniloiu
Creator
Igor Stojkovic
Moved to GitHub: phobos#9719 →

Comments

Comment #0 by stojkovic.igor — 2017-09-03T16:47:08Z
Same goes for sharedAllocatorObject. Currently allocatorObject under this: static if (is(typeof({ A b = a; A c = b; }))) // copyable finishes with return cast(CAllocatorImpl!A) emplace!(CAllocatorImpl!A)(state); I believe it should do this: auto res = cast(CAllocatorImpl!A) emplace!(CAllocatorImpl!A)(state); res.impl = a; return res; Or CAllocatorImpl should have a constructor which does this and takes a as a parameter for this case.
Comment #1 by robert.schadek — 2024-12-01T16:30:46Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9719 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB