Stack overflow

Jonathan M Davis jmdavisProg at gmx.com
Sun Jun 24 17:48:38 PDT 2012


On Sunday, June 24, 2012 19:03:17 Namespace wrote:
> > This might work:
> > 
> > this(U)(U obj)
> > 
> >     if(is(U : T) && !is(U == typeof(null)))
> > 
> > {
> > }
> > 
> > 
> > - Jonathan M Davis
> 
> Interesting. With or wihtout that, if i add a method to Foo it
> prints "Stack overflow" also.
> 
> http://dpaste.dzfl.pl/91dad66c
> 
> Can you explain that?

Wait, you have a template mixin inside of Foo which passes Foo to it? I don't 
know if you can get away with that or not, since you're trying to pass a type 
to a template while you're adding stuff to it via that template. So, the type 
is incomplete. I'm willing to be that that's your problem, but I don't know.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list