← Back to index
|
Original Bugzilla link
Bug 21991 – allocator.dispose does not work for array of qualified type
Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-04T13:30:48Z
Last change time
2024-12-01T16:38:57Z
Assigned to
No Owner
Creator
Harry Vennik
Moved to GitHub: phobos#9824 →
Comments
Comment #0
by htvennik — 2021-06-04T13:30:48Z
std.experimental.allocator.dispose does not compile for arrays of qualified type. ---- import std.experimental.allocator : makeArray, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() { alias alloc = Mallocator.instance; const(int)[] arr = alloc.makeArray!int(10); alloc.dispose(arr); } ---- /dlang/dmd/linux/bin64/../../src/phobos/std/experimental/allocator/package.d(2444): Error: function `std.experimental.allocator.mallocator.Mallocator.deallocate(void[] b) shared` is not callable using argument types `(const(int)[]) shared` /dlang/dmd/linux/bin64/../../src/phobos/std/experimental/allocator/package.d(2444): cannot pass argument `array` of type `const(int)[]` to parameter `void[] b` onlineapp.d(9): Error: template instance `std.experimental.allocator.dispose!(shared(Mallocator), const(int))` error instantiating
Comment #1
by robert.schadek — 2024-12-01T16:38:57Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/9824
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB