On Friday, 5 January 2018 at 20:51:14 UTC, Basile B. wrote:
Yeah, i didn't explain correctly the mixin thing.
The mixin would be used to disable "new" and "delete", e.g
enum disableNewAndDelete = "@disable new (size_t
size){return null;} @disable delete (void* p){}";
and then you mix it
On Friday, 5 January 2018 at 20:45:20 UTC, jmh530 wrote:
On Friday, 5 January 2018 at 19:44:38 UTC, Basile B. wrote:
[snip]
- Libraries that don't want their aggregates to reside on the
GC heap can use this, with a mixin. (note: although the
GCAllocator can still be used...)
Cool.
Not sure
On Friday, 5 January 2018 at 19:44:38 UTC, Basile B. wrote:
[snip]
- Libraries that don't want their aggregates to reside on the
GC heap can use this, with a mixin. (note: although the
GCAllocator can still be used...)
Cool.
Not sure I'm following with your point with the mixin. A mixin
I was chatting on IRC. One of the topic was about a "@nogc"
thread. I suggested something like "core.thread.NoGcThread" that
would take a "@nogc" function but then i realized that this
hypothetical class could still be allocated on the GC heap.
So "new" and "delete" would have to be