Re: dump object

2009-03-30 Thread grauzone
Qian Xu wrote: Hi All, previously I saw an article about how to dump an object with all properties. -code--- void log(T)(T obj) { static if (is(T == struct) || is(T == class)){ writef("{"); foreach(i,_;obj.tupleof) { writefln("%s : %s,", ob

dump object

2009-03-30 Thread Qian Xu
Hi All, previously I saw an article about how to dump an object with all properties. -code--- void log(T)(T obj) {  static if (is(T == struct) || is(T == class)){      writef("{");  foreach(i,_;obj.tupleof) {    writefln("%s : %s,", obj.tupleof[i].stri

Re: dsss with dmd2?

2009-03-30 Thread Trass3r
Frank Benoit schrieb: rebuild uses the dmd frontend, so it might also generate errors. And that errors might look exactly the same as those from dmd. And if the rebuild profile is not configured to have D_Version2 set, the frontend might lead you on the wrong track. Ah, now I get the point :) T

Re: dsss with dmd2?

2009-03-30 Thread Frank Benoit
Trass3r schrieb: > Frank Benoit schrieb: >> It is set by the compiler. But dsss has an own D compiler included to >> retrieve the imports and pragmas. If you see error messages, they might >> come from the dsss internal DMD frontend. >> You can set the versions in the compiler profile, see dsss/etc

Re: dsss with dmd2?

2009-03-30 Thread Trass3r
Frank Benoit schrieb: It is set by the compiler. But dsss has an own D compiler included to retrieve the imports and pragmas. If you see error messages, they might come from the dsss internal DMD frontend. You can set the versions in the compiler profile, see dsss/etc/rebuild/ Yeah, but I thoug

Re: dsss with dmd2?

2009-03-30 Thread Frank Benoit
Trass3r schrieb: > I got the dmd2 compiler in the PATH, thus dsss correctly uses phobos > imports and stuff from the dmd2 directory. > BUT what it does not is setting the D_Version2 version??? Why does that > happen, isn't that set by the compiler? It is set by the compiler. But dsss has an own D

dsss with dmd2?

2009-03-30 Thread Trass3r
I got the dmd2 compiler in the PATH, thus dsss correctly uses phobos imports and stuff from the dmd2 directory. BUT what it does not is setting the D_Version2 version??? Why does that happen, isn't that set by the compiler?