On Wednesday, 10 June 2015 at 20:22:18 UTC, Adel Mamin wrote:
ubyte[5] a = 0xAA; // Fine. Five 0xAA bytes.
auto a2 = new ubyte[5]; // Fine. Five 0 bytes.
Now, let's say, I want to allocate an array of a size, derived
at run time, and initialize it to some non-zero value at the
same time. What w
On Thursday, 18 December 2014 at 15:48:02 UTC, Mathias LANG wrote:
An exemple being fullyQualifiedName:
https://github.com/D-Programming-Language/phobos/blob/master/std/traits.d#L415
I don't get this pattern. Is it documented somewhere ?
http://dlang.org/variadic-function-templates.html
shared int[] foo;
auto bar() {
foo ~= 42;
return foo.idup;
}
Error: cannot implicitly convert element type shared(int) to
immutable in foo.idup
Is this not correct? If I instead dup'd an array of ints (or some
other non-reference elements) and cast to immutable, would I be
in
https://bitbucket.org/nriddick/phaser
So I made this thing for cross-thread data sharing/passing. It
has the functionality I wanted out of it. Here's the gist of how
I use it:
auto phaser = new Phaser!(type,power2_number);
foreach(i;0..threads) {
spawn(&pull_function, phaser.subscribe