std.experimental.allocator and const etc.

2018-07-15 Thread John Colvin via Digitalmars-d
Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() { const a = theAllocator.makeArray!ubyte(100); theAllocator.dispose(a); // can't call R

Re: std.experimental.allocator and const etc.

2018-07-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 15 July 2018 at 13:06:16 UTC, John Colvin wrote: Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() { const a = theAllocator.makeArray

Re: std.experimental.allocator and const etc.

2018-07-17 Thread Steven Schveighoffer via Digitalmars-d
On 7/15/18 9:06 AM, John Colvin wrote: Currently the API's don't support const(void)[], e.g. import std.experimental.allocator : makeArray, theAllocator, dispose; import std.experimental.allocator.mallocator : Mallocator; void main() {     const a = theAllocator.makeArray!ubyte(100);     theA