Re: Problem with receiveOnly and classes

2012-03-27 Thread kraybourne
On 3/25/12 19:33 , Ghislain wrote: Hello, [...] I do not understand why an object of type A is fetched as a Variant, while a object of type B is received correctly. [...] Any idea? Hi! I get the same on Mac DMD 2.058. I have no idea. Looks like a bug to me, although I can't say which part i

Re: Compiling DMD on MAC OS X

2012-02-19 Thread kraybourne
On 2/19/12 09:20 , Tyro[a.c.edwards] wrote: Hi all, I've just installed DMD 2.058 and attempted to compile a little script but was greeted with the following error: gcc: Invalid argument I used the .dmg installer from http://www.dlang.org/download.html and issued the command: dmd average Is

Re: Let this() figure out T implicitly?

2012-02-17 Thread kraybourne
On 2/17/12 2:38 PM, Timon Gehr wrote: On 02/17/2012 02:07 PM, Kevin Cox wrote: Yes. At least as the compiler would say. It's a little odd but I believe that is how the D Nam mangling works. I personally just think of Foo!(Class) as the type. class Foo(T){ ... } Is syntactic sugar for templa

Re: Let this() figure out T implicitly?

2012-02-17 Thread kraybourne
type? I think I've seen errors like that pop up...) On Feb 17, 2012 7:20 AM, "kraybourne" mailto:st...@kraybourne.com>> wrote: Hi! This doesn't work: import std.stdio; class Foo(T) { T t;

Re: Let this() figure out T implicitly?

2012-02-17 Thread kraybourne
On 2/17/12 1:32 PM, bearophile wrote: kraybourne: Then it compiles. Is it possible to have this() figure out the type some way? Usually people write a small global function helper. Hm, so, something like this: Foo!(T) newFoo(T)(T val) { return new Foo!(T

Let this() figure out T implicitly?

2012-02-17 Thread kraybourne
Hi! This doesn't work: import std.stdio; class Foo(T) { T t; this(T val) { t = val; } } void main() { auto o = new Foo(5); } __