One pass through std.range and friends

* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
This commit is contained in:
Andrei Alexandrescu 2011-02-26 15:15:36 -06:00
parent 69d8b2e514
commit 1083bd4e7b
13 changed files with 2861 additions and 2420 deletions

View file

@ -54,8 +54,7 @@ if (isIterable!Range && !isNarrowString!Range)
static if (is(typeof(e.opAssign(e))))
{
// this should be in-place construction
auto voidArr = (cast(void*) (result.ptr + i))[0..E.sizeof];
emplace!E(voidArr, e);
emplace!E(result.ptr + i, e);
}
else
{