The pragmas have not been as effective as we might have liked, since
they only work with templates and can't tell you where in your code you
need to make changes, and they seemed to have been more annoying to
programmers than helpful, so we're going to discontinue them. We'll
leave them in for stuff that's actually been deprecated until deprecated
has been improved enough to take a message, but we'll leave "scheduled
for deprecation" messages to the documentation and changelog.
This behavior is reasonable and explicitly tested for in the unit tests, but previously, one could think that they always returned a copy from the docs.
The idea is to make the template constraint match exactly what the user
needs to instantiate it rather than seeing the more complex template
constraints that the various overloads of join have. Not that the
resulting template constraint is altogether short either, but it's now
the bare minimum which all join overloads must match rather than
including the specifics necessary to distinguish each overload.
Simplify the common pattern `(cast(T*)GC.malloc(T.sizeof * n, NO_SCAN))[0 .. n]` to the new function `uninitializedArray!(T[])(n)`.
Note that there was some `NO_SCAN` attributes originally determined at runtime using `typeid()`, but now is determined statically using `hasIndirection!()` from the implementation of `uninitializedArray`.
There were also some `GC.malloc` usage looks like `uninitializedArray` in `std.parallelism` but I'm leaving it alone for someone who is more familiar with this module ;).
I also went over the other functions in std.array and made them work
with immutable arrays where applicable. The unit tests have been
appropriately expanded as well.
Makes a large chunk of Phobos usable in CTFE. Fixes:
5632 replace() not evaluatable at compile-time anymore
This is still not very efficient, for CTFE it's a bit more efficient to just
use ~= for appending.
indexOf and lastIndexOf should not work properly with unicode for all
string types (unlike before). As part of that, I also ended up fixing a
bug in std.array.back for strings (wstrings in particular were broken).
I also improved various, related unit tests.
* 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.
In particular, functions which make changes in place have now been
renamed to have InPlace in their name as discussed on the newsgroup
(with versions with the old names scheduled for deprecation). I also
created versions for those functions which do _not_ do the changes in
place, but in at least a couple of cases, they had to be left commented
out until the old versions which do make the changes in place have
actually been removed. I'd love to just remove the old versions, but
that would silently break code, so tough luck for now.