Re: Widening a type

2009-04-16 Thread BCS
Hello Daniel, You can remove those braces, I just wanted to point out that putting "static" out the front of an "if" doesn't magically make the "else" branch static as well. I known what you are saying but that didn't read right to me: An if as a static if's else clause is not magically a st

Re: Widening a type

2009-04-16 Thread Jarrett Billingsley
On Thu, Apr 16, 2009 at 10:11 PM, Doctor J wrote: > template Widen (T, alias varname) > { >static if (is (T: ulong)) >ulong varname = 0; >else if (is (T: double)) else *static* if(is(T: double))

Re: Widening a type

2009-04-16 Thread Daniel Keep
Doctor J wrote: > OK, here's one for you that sounds like it ought to be easy, but I don't > immediately see how to do it in a pretty way. > > Given a type parameter T of a template: > If T is an integral type, I want to declare a variable 'widest' of type ulong; > If T is a floating-point type

Widening a type

2009-04-16 Thread Doctor J
OK, here's one for you that sounds like it ought to be easy, but I don't immediately see how to do it in a pretty way. Given a type parameter T of a template: If T is an integral type, I want to declare a variable 'widest' of type ulong; If T is a floating-point type, I want to declare a variable

Re: Template classes

2009-04-16 Thread Jarrett Billingsley
On Thu, Apr 16, 2009 at 1:14 PM, Arild Boes wrote: > Actually the f-call syntactic sugar seems like a good way to keep core > classes of any library very lean and mean, whilst maintaining the ability to > expand the module without re-compiling the original library! (just import > this guy, and th

Re: Template classes

2009-04-16 Thread Arild Boes
Jarrett Billingsley skrev: On Wed, Apr 15, 2009 at 12:13 PM, Arild Boes wrote: Take a look at the 'this' of D2, it allows to create wrapper structs, so you can just add methods to the built-in arrays. Bye, bearophile Please elaborate on this. How does one do that? With the new, delicious "

Re: DMD2028+Phobos cannot compile sample

2009-04-16 Thread Sam Hu
Kagamin Wrote: > http://d.puremagic.com/issues/show_bug.cgi?id=2580 Ah...what a lovely place here.It works now :D

Re: Andrie's new Phobos preview package

2009-04-16 Thread Don
Sam Hu wrote: Hi, I am interested to the subjected new phobos from below link: http://www.erdani.dreamhosters.com/d/ So I downloaded the libphobos2.lib and libphobos2.a from this site manually and then I downloaded the whole package from http://svn.dsource.org/projects/phobos/trunk using Tortoi

Re: DMD2028+Phobos cannot compile sample

2009-04-16 Thread Kagamin
http://d.puremagic.com/issues/show_bug.cgi?id=2580

Re: Andrie's new Phobos preview package

2009-04-16 Thread Kagamin
dmd/src should be deleted rather than overwritten.