Re: aliases and templates

2009-01-22 Thread Jarrett Billingsley
On Thu, Jan 22, 2009 at 10:56 AM, Trass3r wrote: > I already read about "Implicit Template Properties": > If a template has exactly one member in it, and the name of that member is > the same as the template name, that member is assumed to be referred to in a > template instantiation > > I guess t

Re: SSE intrinsics?

2009-01-22 Thread Jarrett Billingsley
On Thu, Jan 22, 2009 at 10:43 AM, Trass3r wrote: > Jarrett Billingsley schrieb: >> >> Why do that when you could use some template madness to make an SSE >> assembler? ;) > > ^^ Would that make sense? > How do those intrinsics get evaluated? I mean in which step of compilation, > in the frontend

aliases and templates

2009-01-22 Thread Trass3r
I already read about "Implicit Template Properties": If a template has exactly one member in it, and the name of that member is the same as the template name, that member is assumed to be referred to in a template instantiation I guess the following is something similar, but why are aliases us

Re: SSE intrinsics?

2009-01-22 Thread Trass3r
Jarrett Billingsley schrieb: Why do that when you could use some template madness to make an SSE assembler? ;) ^^ Would that make sense? How do those intrinsics get evaluated? I mean in which step of compilation, in the frontend or backend, etc.

Re: How to get the implementer of an interface?

2009-01-22 Thread Frits van Bommel
Denis Koroskin wrote: On Thu, 22 Jan 2009 11:17:20 +0300, Qian Xu wrote: how to get the implementer of an interface? [snip] Try the following: writefln(cast(Object)i); Or writefln((cast(Object)i).classinfo.name); if you want the class name, not the result of toString (which is only

Re: How to get the implementer of an interface?

2009-01-22 Thread Denis Koroskin
On Thu, 22 Jan 2009 11:17:20 +0300, Qian Xu wrote: Hello All, how to get the implementer of an interface? Here is an example: - interface intf_1 {} class c_1 : intf_1 {} class c_2 : c_1 {} c_1 aaa = new c_1; c_2 bbb = new c_2; auto

Re: How to get the implementer of an interface?

2009-01-22 Thread Daniel Keep
Qian Xu wrote: > Hello All, > > how to get the implementer of an interface? > > Here is an example: > - > interface intf_1 {} > class c_1 : intf_1 {} > class c_2 : c_1 {} > > c_1 aaa = new c_1; > c_2 bbb = new c_2; > auto list = [cast

How to get the implementer of an interface?

2009-01-22 Thread Qian Xu
Hello All, how to get the implementer of an interface? Here is an example: - interface intf_1 {} class c_1 : intf_1 {} class c_2 : c_1 {} c_1 aaa = new c_1; c_2 bbb = new c_2; auto list = [cast(intf_1)(bbb), cast(intf_1)(aaa)]; foreach