This enables the test suite to build with the -property switch enabled.
std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
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.