Re: Freelists and clear/emplace

2012-06-16 Thread Timon Gehr
On 06/16/2012 10:02 PM, Timon Gehr wrote: On 06/16/2012 09:55 PM, F i L wrote: Timon Gehr wrote: 'typeof(this)' can be used to avoid stuttering the type at the mixin location. mixin template Pool() { mixin Pool!(typeof(this)); } class MyOtherClass { mixin Pool; } For some reason I was u

Re: Freelists and clear/emplace

2012-06-16 Thread Timon Gehr
On 06/16/2012 09:55 PM, F i L wrote: Timon Gehr wrote: 'typeof(this)' can be used to avoid stuttering the type at the mixin location. mixin template Pool() { mixin Pool!(typeof(this)); } class MyOtherClass { mixin Pool; } For some reason I was under the impression that typeof(this) could

Re: Freelists and clear/emplace

2012-06-16 Thread F i L
Timon Gehr wrote: 'typeof(this)' can be used to avoid stuttering the type at the mixin location. mixin template Pool() { mixin Pool!(typeof(this)); } class MyOtherClass { mixin Pool; } For some reason I was under the impression that typeof(this) couldn't be resolved in this situation (n

Re: Freelists and clear/emplace

2012-06-16 Thread Timon Gehr
On 06/16/2012 09:34 PM, F i L wrote: On Saturday, 16 June 2012 at 01:14:06 UTC, d coder wrote: Greetings Is emplace/clear mechanism mature enough to be used to create freelists? I looked but found very scanty documentation on emplace/clear on dlang.org. Regards - Puneet I did performance t

Re: Freelists and clear/emplace

2012-06-16 Thread F i L
^^ Typo, should be: struct MyStruct { mixin Pool!MyStruct*; }

Re: Freelists and clear/emplace

2012-06-16 Thread F i L
On Saturday, 16 June 2012 at 01:14:06 UTC, d coder wrote: Greetings Is emplace/clear mechanism mature enough to be used to create freelists? I looked but found very scanty documentation on emplace/clear on dlang.org. Regards - Puneet I did performance tests awhile ago and emplace() was

Re: Freelists and clear/emplace

2012-06-16 Thread Dmitry Olshansky
On 16.06.2012 15:51, Timon Gehr wrote: On 06/16/2012 03:07 AM, d coder wrote: Greetings Is emplace/clear mechanism mature enough to be used to create freelists? I looked but found very scanty documentation on emplace/clear on dlang.org . Regards - Puneet I create most

Re: Freelists and clear/emplace

2012-06-16 Thread Timon Gehr
On 06/16/2012 03:07 AM, d coder wrote: Greetings Is emplace/clear mechanism mature enough to be used to create freelists? I looked but found very scanty documentation on emplace/clear on dlang.org . Regards - Puneet I create most of my objects with emplace and have not ex

Freelists and clear/emplace

2012-06-15 Thread d coder
Greetings Is emplace/clear mechanism mature enough to be used to create freelists? I looked but found very scanty documentation on emplace/clear on dlang.org. Regards - Puneet