Mallocator
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 3 12:31:47 PST 2016
On Thursday, 3 March 2016 at 20:16:55 UTC, Erik Smith wrote:
>
> The later works and qualifying the allocator member variable
> shared seems to solve the issue. Example:
>
> struct A(T) {
> alias Allocator = T;
> shared Allocator allocator;
> this(string url="") {
> allocator = Allocator();
> void *p1 = cast(void*)(allocator.allocate(1024));
> //void p2[] = allocator.allocate(1024); // ICE
> }
> }
Does this still ICE when you write it as `void[] p2 =
allocator.allocate(1024)`?
More information about the Digitalmars-d
mailing list