On Monday, 16 April 2012 at 23:58:29 UTC, Michaël Larouche wrote:
I've given a second chance to D after watching D videos from Lang.NEXT 2012. As a first look, I wanted to try generate serialization code at compile time.

Here's the class:
class MyObject
{
    public int m_id;
    public Data m_data;
    public bool AutoDelete;
    public int RefCount;

mixin(AddStreamSerialization!(MyObject));
}

Sorry I hit the send button.

My template works with a struct but when I try to mixin my template in a class, I get compile error because T.tupleof.length returns 0.

Here's the whole code:
http://ideone.com/UR6YU

Reply via email to