diff --git a/std/algorithm/iteration.d b/std/algorithm/iteration.d index 46d50a3b9..335db8f1a 100644 --- a/std/algorithm/iteration.d +++ b/std/algorithm/iteration.d @@ -3683,7 +3683,8 @@ if (is(typeof(binaryFun!pred(r.front, s)) : bool) int[][] w = [ [1, 2], [], [3], [4, 5], [] ]; static assert(isForwardRange!(typeof(splitter(a, 0)))); - // foreach (x; splitter(a, 0)) { + // foreach (x; splitter(a, 0)) + // { // writeln("[", x, "]"); // } assert(equal(splitter(a, 0), w)); diff --git a/std/bigint.d b/std/bigint.d index 2e46a7364..53ac6d920 100644 --- a/std/bigint.d +++ b/std/bigint.d @@ -719,7 +719,9 @@ public: Warning: Casting to/from $(D const) or $(D immutable) may break type system guarantees. Use with care. */ - T opCast(T)() pure nothrow @nogc const if (is(Unqual!T == BigInt)) { + T opCast(T)() pure nothrow @nogc const + if (is(Unqual!T == BigInt)) + { return this; } diff --git a/std/bitmanip.d b/std/bitmanip.d index 04d0af17c..3cd1a5110 100644 --- a/std/bitmanip.d +++ b/std/bitmanip.d @@ -311,7 +311,9 @@ The example above creates a tagged reference to an Object in the struct A. This as $(D taggedPointer), except the first argument which must be a class type instead of a pointer type. */ -template taggedClassRef(T, string name, Ts...) if (is(T == class)) { +template taggedClassRef(T, string name, Ts...) +if (is(T == class)) +{ enum taggedClassRef = createTaggedReference!(T, 8, name, Ts).result; } diff --git a/std/csv.d b/std/csv.d index 1e3c325dd..5778cc0da 100644 --- a/std/csv.d +++ b/std/csv.d @@ -828,7 +828,8 @@ public: * auto records = CsvReader!(int,Malformed.ignore,string,char,string[]) * (str, ';', '^'); * - * foreach (record; records) { + * foreach (record; records) + * { * assert(equal(record, ans)); * } * ------- @@ -852,7 +853,8 @@ public: * (str, ["high","low"], ';', '^'); * * int[] ans = [76,22]; - * foreach (record; records) { + * foreach (record; records) + * { * assert(equal(record, ans)); * } * ------- diff --git a/std/range/interfaces.d b/std/range/interfaces.d index c081d2a41..2933f422d 100644 --- a/std/range/interfaces.d +++ b/std/range/interfaces.d @@ -275,7 +275,9 @@ class OutputRangeObject(R, E...) : staticMap!(OutputRange, E) { /**Returns the interface type that best matches $(D R).*/ -template MostDerivedInputRange(R) if (isInputRange!(Unqual!R)) { +template MostDerivedInputRange(R) +if (isInputRange!(Unqual!R)) +{ private alias E = ElementType!R; static if (isRandomAccessRange!R) @@ -332,7 +334,9 @@ template MostDerivedInputRange(R) if (isInputRange!(Unqual!R)) { * all relevant range primitives in virtual functions. If $(D R) is already * derived from the $(D InputRange) interface, aliases itself away. */ -template InputRangeObject(R) if (isInputRange!(Unqual!R)) { +template InputRangeObject(R) +if (isInputRange!(Unqual!R)) +{ static if (is(R : InputRange!(ElementType!R))) { alias InputRangeObject = R; @@ -465,7 +469,9 @@ template InputRangeObject(R) if (isInputRange!(Unqual!R)) { /**Convenience function for creating an $(D InputRangeObject) of the proper type. * See $(LREF InputRange) for an example. */ -InputRangeObject!R inputRangeObject(R)(R range) if (isInputRange!R) { +InputRangeObject!R inputRangeObject(R)(R range) +if (isInputRange!R) +{ static if (is(R : InputRange!(ElementType!R))) { return range; diff --git a/std/stdio.d b/std/stdio.d index 0f8e98a82..7dde33ea2 100644 --- a/std/stdio.d +++ b/std/stdio.d @@ -1,4 +1,4 @@ -// Written in the D programming language. +// Written in the D programming language. /** Standard I/O functions that extend $(B core.stdc.stdio). $(B core.stdc.stdio) @@ -2583,7 +2583,7 @@ $(D Range) that locks the file and allows fast writing to it. } // @@@BUG@@@ 2340 - //void front(C)(C c) if (is(C : dchar)) { + //void front(C)(C c) if (is(C : dchar)) /// ditto void put(C)(C c) @safe if (is(C : const(dchar))) { diff --git a/std/string.d b/std/string.d index fb4963a8c..4bbd6afd6 100644 --- a/std/string.d +++ b/std/string.d @@ -1574,7 +1574,8 @@ ptrdiff_t indexOfAny(Char,Char2)(const(Char)[] haystack, const(Char2)[] needles, } /// -@safe pure unittest { +@safe pure unittest +{ import std.conv : to; ptrdiff_t i = "helloWorld".indexOfAny("Wr");