Differences From Artifact [193cf29f54393c6e]:
- File
polemy/tricks.d
- 2010-11-07 10:32:59 - part of checkin [4198578702e] on branch trunk - Changed several documentation comments into ddoc compatible ones. (user: kinaba) [annotate]
To Artifact [16f826d18ff480be]:
- File
polemy/tricks.d
- 2010-11-07 14:34:29 - part of checkin [0569f7b8c2] on branch trunk - - Added function literal evaluator (i.e., closure). - Workaround for d2stacktrace's infinite-loop bug. (when std.demangle.demangle use exception inside it, it will go into an infinite loop. to avoid this, I choose to unset TraceHandler during stacktrace generation. This is far from the complete solution, but at least it should work as expected under single-thread environment...) (user: kinaba) [annotate]
26 26 /// Mixing-in the bean constructor for a class
27 27
28 28 /*mixin*/ template SimpleConstructor()
29 29 {
30 30 static if( is(typeof(super) == Object) || super.tupleof.length==0 )
31 31 this( typeof(this.tupleof) params )
32 32 {
33 - this.tupleof = params;
33 + static if(this.tupleof.length>0)
34 + this.tupleof = params;
34 35 }
35 36 else
36 37 // this parameter list is not always desirable but should work for many cases
37 38 this( typeof(super.tupleof) ps, typeof(this.tupleof) params )
38 39 {
39 40 super(ps);
40 - this.tupleof = params;
41 + static if(this.tupleof.length>0)
42 + this.tupleof = params;
41 43 }
42 44 }
43 45
44 46 /// Mixing-in the (MOST-DERIVED) member-wise comparator for a class
45 47
46 48 /*mixin*/ template SimpleCompare()
47 49 {