On Thursday, 3 March 2016 at 20:31:47 UTC, Meta wrote:
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)`?
No. :)