On Fri, 22 Oct 2010 01:50:56 + (UTC)
%u e...@ee.com wrote:
What is the fastest way to fill a static multidimensional array?
Looping over all dimension's elements sounds inefficient, especially as a
static array is essentially continuous memory.
What is the best practice?
int[2][2][2]
Hello,
Where can one find descriptions of Throwable, Error, Exception? (I mean, how
do you even know they exist?) I could finally guess the constructor must have a
string parameter used for error output.
Also, is it possible to implicitely reuse the superclass's constructor? I had
to write:
E.this performs nothing new. But without it, I get a compiler error:
trial.d(7): Error: constructor trial.E.this no match for implicit
super() call in constructor
Isn't the constructor inherited like other attributes?
I think if you don't provide a constructor a default one is created:
On Fri, 22 Oct 2010 13:00:43 +0200, spir wrote:
Hello,
Where can one find descriptions of Throwable, Error, Exception? (I
mean, how do you even know they exist?) I could finally guess the
constructor must have a string parameter used for error output.
Well, they should be in the
Somehow I find it surprising that this copies the whole array.
arr[] = arr2;
Static arrays are value types.
Although it is somewhat annoying that there is no default value for the
msg parameter in the first constructor, it is pretty easy to use the
mixin templates to overcome the issue:
public mixin template ExceptionCtorMixin() {
this(string msg = null, Throwable next = null) { super(msg,
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
On 2010-10-22 20:57, %u wrote:
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
D1 neither has __traits or auto ref. I guess that the section was
accidentally put in the
== Quote from Jacob Carlborg (d...@me.com)'s article
On 2010-10-22 20:57, %u wrote:
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
D1 neither has __traits or