alias this and initialisation

2020-05-24 Thread Danni Coy via Digitalmars-d-learn
can anybody tell me why struct S { int x; alias x this; } void test() { S s; s = 8; // this works S s = 8 // but this does not? }

Re: Game and GC

2018-04-07 Thread Danni Coy via Digitalmars-d-learn
gc causes unpredictabilities in performance*. With games it tends to be worst case performance that matters. I would reccomend using std.experimental.allocator (even if you still use the default GC backed allocator). This will allow you to swap out your allocator for a more specialised one as

Static array * scalar is not working for me

2017-07-30 Thread Danni Coy via Digitalmars-d-learn
The following code is not working for me float[3] f; f[] = abs(f)[] * -1.0f; where abs is a function that returns a float[3]; it complains that f should be attached to some memory. Is it a bug or am I missing something?

Re: DDox and filters.

2017-07-27 Thread Danni Coy via Digitalmars-d-learn
yup figured it out - module documentation needs to go *above* the module declaration or you get nothing. On Fri, Jul 28, 2017 at 11:53 AM, Soulsbane via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Thursday, 27 July 2017 at 03:01:50 UTC, Danni Coy wrote: > >> I am trying

DDox and filters.

2017-07-26 Thread Danni Coy via Digitalmars-d-learn
I am trying to build my projects documentation via the ddox system via dub. It seems that my modules are being documented and then filtered out. Ironically for a documentation system there isn't a lot of documentation. What is the minimum I need in order for documentation to show up? how do I

std.experimental.allocator example wanted

2016-04-22 Thread Danni Coy via Digitalmars-d-learn
Can somebody give me a quick example of how to combine the MMapAllocator with the AllocatorList and the BitmapBlock objects together?

std.experimental.allocator and @nogc?

2016-04-11 Thread Danni Coy via Digitalmars-d-learn
Lets assume I want to be able to swap in and out allocators none of which will be the gc_allocator... What is best practice for using std.experimental.allocator in @nogc code?