diff --git a/std/algorithm/mutation.d b/std/algorithm/mutation.d index b0e770768..839183dee 100644 --- a/std/algorithm/mutation.d +++ b/std/algorithm/mutation.d @@ -1943,6 +1943,7 @@ if (Offset.length >= 1 && allSatisfy!(isValidIntegralTuple, Offset)) return removeImpl!s(range, offset); } +/// ditto deprecated("Use of non-integral tuples is deprecated. Use remove(tuple(start, end).") Range remove (SwapStrategy s = SwapStrategy.stable, Range, Offset ...) diff --git a/std/array.d b/std/array.d index f48602e4c..21b45d2ec 100644 --- a/std/array.d +++ b/std/array.d @@ -4676,6 +4676,7 @@ nothrow pure @safe @nogc unittest assert(a == [0, 1]); } +/// ditto pragma(inline, true) U[n] staticArray(U, T, size_t n)(auto ref T[n] a) if (!is(T == U) && is(T : U)) { diff --git a/std/bitmanip.d b/std/bitmanip.d index de2e0fb26..5fee8b09c 100644 --- a/std/bitmanip.d +++ b/std/bitmanip.d @@ -784,48 +784,6 @@ if (is(T == class)) static assert(!__traits(compiles, bar(s))); } -/** - Allows manipulating the fraction, exponent, and sign parts of a - `float` separately. The definition is: - ----- -struct FloatRep -{ - union - { - float value; - mixin(bitfields!( - uint, "fraction", 23, - ubyte, "exponent", 8, - bool, "sign", 1)); - } - enum uint bias = 127, fractionBits = 23, exponentBits = 8, signBits = 1; -} ----- -*/ -alias FloatRep = FloatingPointRepresentation!float; - -/** - Allows manipulating the fraction, exponent, and sign parts of a - `double` separately. The definition is: - ----- -struct DoubleRep -{ - union - { - double value; - mixin(bitfields!( - ulong, "fraction", 52, - ushort, "exponent", 11, - bool, "sign", 1)); - } - enum uint bias = 1023, signBits = 1, fractionBits = 52, exponentBits = 11; -} ----- -*/ -alias DoubleRep = FloatingPointRepresentation!double; - private struct FloatingPointRepresentation(T) { static if (is(T == float)) @@ -851,6 +809,27 @@ private struct FloatingPointRepresentation(T) } } +/** + Allows manipulating the fraction, exponent, and sign parts of a + `float` separately. The definition is: + +---- +struct FloatRep +{ + union + { + float value; + mixin(bitfields!( + uint, "fraction", 23, + ubyte, "exponent", 8, + bool, "sign", 1)); + } + enum uint bias = 127, fractionBits = 23, exponentBits = 8, signBits = 1; +} +---- +*/ +alias FloatRep = FloatingPointRepresentation!float; + /// @safe unittest { @@ -899,6 +878,27 @@ private struct FloatingPointRepresentation(T) assert(rep.sign); } +/** + Allows manipulating the fraction, exponent, and sign parts of a + `double` separately. The definition is: + +---- +struct DoubleRep +{ + union + { + double value; + mixin(bitfields!( + ulong, "fraction", 52, + ushort, "exponent", 11, + bool, "sign", 1)); + } + enum uint bias = 1023, signBits = 1, fractionBits = 52, exponentBits = 11; +} +---- +*/ +alias DoubleRep = FloatingPointRepresentation!double; + /// @safe unittest { diff --git a/std/digest/murmurhash.d b/std/digest/murmurhash.d index 533db9218..b94042f1a 100644 --- a/std/digest/murmurhash.d +++ b/std/digest/murmurhash.d @@ -38,11 +38,6 @@ $(BR) $(LINK2 https://en.wikipedia.org/wiki/MurmurHash, Wikipedia) */ module std.digest.murmurhash; -version (X86) - version = HaveUnalignedLoads; -else version (X86_64) - version = HaveUnalignedLoads; - /// @safe unittest { @@ -97,6 +92,11 @@ else version (X86_64) assert(hashed == [188, 165, 108, 2]); } +version (X86) + version = HaveUnalignedLoads; +else version (X86_64) + version = HaveUnalignedLoads; + public import std.digest; @safe: diff --git a/std/json.d b/std/json.d index ac397e5f9..088e77fd6 100644 --- a/std/json.d +++ b/std/json.d @@ -678,6 +678,7 @@ struct JSONValue assert( j["language"].str == "Perl" ); } + /// ditto void opIndexAssign(T)(T arg, size_t i) { auto a = this.arrayNoRef; @@ -754,11 +755,13 @@ struct JSONValue assert(j["author"].str == "Walter"); } + /// bool opEquals(const JSONValue rhs) const @nogc nothrow pure @safe { return opEquals(rhs); } + /// ditto bool opEquals(ref const JSONValue rhs) const @nogc nothrow pure @trusted { // Default doesn't work well since store is a union. Compare only diff --git a/std/random.d b/std/random.d index 70b87ddd5..9b3c5edfc 100644 --- a/std/random.d +++ b/std/random.d @@ -107,18 +107,6 @@ module std.random; import std.range.primitives; import std.traits; -version (OSX) - version = Darwin; -else version (iOS) - version = Darwin; -else version (TVOS) - version = Darwin; -else version (WatchOS) - version = Darwin; - -version (D_InlineAsm_X86) version = InlineAsm_X86_Any; -version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any; - /// @safe unittest { @@ -178,6 +166,18 @@ version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any; assert([0, 1, 2, 4, 5].randomShuffle(rnd2).equal([4, 2, 5, 0, 1])); } +version (OSX) + version = Darwin; +else version (iOS) + version = Darwin; +else version (TVOS) + version = Darwin; +else version (WatchOS) + version = Darwin; + +version (D_InlineAsm_X86) version = InlineAsm_X86_Any; +version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any; + version (StdUnittest) { static import std.meta; diff --git a/std/string.d b/std/string.d index 7ed24f7f9..b1063ee00 100644 --- a/std/string.d +++ b/std/string.d @@ -4845,6 +4845,7 @@ if (isForwardRange!Range && isSomeChar!(ElementEncodingType!Range) && assert(detabber(" \n\tx", 9).array == " \n x"); } +/// ditto auto detabber(Range)(auto ref Range r, size_t tabSize = 8) if (isConvertibleToString!Range) {