<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 May 2013 18:13, Timo Sintonen <span dir="ltr"><<a href="mailto:t.sintonen@luukku.com" target="_blank">t.sintonen@luukku.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sunday, 12 May 2013 at 15:27:04 UTC, Iain Buclaw wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 12 May 2013 15:41, Rel <<a href="mailto:relmail@rambler.ru" target="_blank">relmail@rambler.ru</a>> wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Benjamin Thaut, yes I know. but here is an example, if I add a class to<br>
the code like that:<br>
<br>
<br>
module main;<br>
<br>
extern (C) void* _Dmodule_ref = null;<br>
extern (C) void printf(const char*, ...);<br>
<br>
extern (C) void puts(const char*);<br>
extern (C) void exit(int);<br>
<br>
class A {<br>
        int a = 100;<br>
        int b = 200;<br>
<br>
};<br>
<br>
extern (C) void main() {<br>
        scope(exit) {<br>
                puts("Exiting!");<br>
                exit(0);<br>
        }<br>
<br>
        A a; printf("%d %d\n", a.a, a.b);<br>
}<br>
<br>
</blockquote>
<br></div><div class="im">
This code won't work.  classes are reference types and need to be<br>
initialised with 'new'.  This requires TypeInfo_Class information to<br>
do...   You could possible use 'scope A a = new A'.  But again your going<br>
into the bounds of needing rtti for the initialiser var to assign it on the<br>
stack.<br>
<br>
Structs would be your friend here...<br>
</div></blockquote>
<br>
I have used the option -fno-emit-moduleinfo and got rid of _Dmodule_ref<br clear="all"></blockquote></div><br></div><div class="gmail_extra">I completely forgot that I put that in.  Well done me *pats own back*.<br></div>
<div class="gmail_extra"><br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>