Re: undefined reference to class template

2014-11-23 Thread Kapps via Digitalmars-d-learn
On Friday, 14 November 2014 at 23:29:34 UTC, Satoshi wrote: Hi, Im using GDC 4.9.0 compiler. I have template classes like public class LinkedList(T) {...} and when I try compile it together, everything works fine. But when I compile every source file to separate object file and link it

Handmade Hero - Casey Muratori podcast about making a complete game in C from scratch.

2014-11-23 Thread olivier henley via Digitalmars-d-learn
Hi, I haven't seen this announced here so I'm stepping in for those that might find it to be of interest... should be everyone if you ask me. Casey Muratori started, like one week ago into serious stuff, a daily podcast where he codes a complete, professional-quality game live and explains

Casting in Safe D

2014-11-23 Thread Nordlöw
I just noticed that void foo() @safe pure nothrow { void[] void_array = new void[3]; auto ubyte_array = cast(ubyte[])void_array; auto short_array = cast(short[])void_array; } compiles but gives a object.Error@(0): array cast misalignment because of the cast(short[]) I'm

How does this work?

2014-11-23 Thread Freddy via Digitalmars-d-learn
I know what this does, but can someone explain how it works? static if((typeof((inout int=0){ })));

Re: Casting in Safe D

2014-11-23 Thread anonymous via Digitalmars-d-learn
On Sunday, 23 November 2014 at 19:37:45 UTC, Nordlöw wrote: I just noticed that void foo() @safe pure nothrow { void[] void_array = new void[3]; auto ubyte_array = cast(ubyte[])void_array; auto short_array = cast(short[])void_array; } compiles but gives a object.Error@(0): array

Re: How does this work?

2014-11-23 Thread ketmar via Digitalmars-d-learn
On Sun, 23 Nov 2014 22:51:48 + Freddy via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I know what this does, but can someone explain how it works? static if((typeof((inout int=0){ }))); it was here somewhere. this is, as you can see, a lambda. `typeof()` can

@property method needs ()

2014-11-23 Thread Andre via Digitalmars-d-learn
Hi, in following example the @property method needs the () otherwise compiler error for row 24 is thrown. I cannot judge, whether the compiler behaves correct or not. Kind regards André --- alias fnError = void delegate(string s); interface IfSession { @property fnError addError();