diff --git a/changelog/std-format-formattedRead-only-pointers.dd b/changelog/std-format-formattedRead-only-pointers.dd index 1cf7e435e89..273bfedc8d2 100644 --- a/changelog/std-format-formattedRead-only-pointers.dd +++ b/changelog/std-format-formattedRead-only-pointers.dd @@ -1,2 +1,14 @@ `std.format.formattedRead` now only accepts pointers as input arguments. +For example, the "bad" version of the following code lead to very confusing +errors from Phobos. + +------- +import std.format; +void main() { + int[3] row; + auto text = "10 20 30"; + //formattedRead(text, "%(%d %)", row); // bad + formattedRead(text, "%(%d %)", &row); // OK +} +------- diff --git a/changelog/std-random-MersenneTwisterEngine.dd b/changelog/std-random-MersenneTwisterEngine.dd index 0fa3d23dab0..bca5f71c6a2 100644 --- a/changelog/std-random-MersenneTwisterEngine.dd +++ b/changelog/std-random-MersenneTwisterEngine.dd @@ -1,3 +1,5 @@ +`MersenneTwisterEngine` has been updated so that its template signature matches the C++11 standard. + `MersenneTwisterEngine` has been updated so that its template signature matches the C++11 standard (adding two new template parameters, an extra tempering parameter `d` and the initialization multiplier `f`). diff --git a/changelog/std-range-bitwise.dd b/changelog/std-range-bitwise.dd index 9881992c655..66e06f2ba0b 100644 --- a/changelog/std-range-bitwise.dd +++ b/changelog/std-range-bitwise.dd @@ -1,6 +1,6 @@ Added `std.range.bitwise` to create a bitwise adapter over an integral type range, consuming the range elements bit by bit. -`std.range.bitwise` creates a bit by bit adapter over an integral type range. +`std.range.bitwise` creates a bit by bit adapter over an integral type range: ------- import std.range : bitwise; ubyte[] arr = [3, 9]; diff --git a/changelog/std-stdio-readf-only-pointers.dd b/changelog/std-stdio-readf-only-pointers.dd index 1bf248a1900..6605ce54023 100644 --- a/changelog/std-stdio-readf-only-pointers.dd +++ b/changelog/std-stdio-readf-only-pointers.dd @@ -1,2 +1,14 @@ `std.stdio.readf` now only accepts pointers as input arguments. +For example, the "bad" version of the following code lead to very confusing +errors from Phobos: + +------- +import std.stdio; +void main() { + int[3] row; + auto text = "10 20 30"; + //readf(text, "%(%d %)", row); // bad + readf(text, "%(%d %)", &row); // OK +} +------- diff --git a/changelog/std-utf-decodeBack.dd b/changelog/std-utf-decodeBack.dd index c81ec8a571b..46872805a3a 100644 --- a/changelog/std-utf-decodeBack.dd +++ b/changelog/std-utf-decodeBack.dd @@ -1,4 +1,5 @@ Added `std.utf.decodeBack` which decodes the last UTF code point of given character range. + ------- import std.utf : decodeBack; diff --git a/posix.mak b/posix.mak index b9c52e13a1a..e71cdd99f2a 100644 --- a/posix.mak +++ b/posix.mak @@ -525,6 +525,16 @@ style: ../dscanner/dsc $(LIB) @echo "Enforce space between binary operators" grep -nrE "[[:alnum:]](==|!=|<=|<<|>>|>>>|^^)[[:alnum:]]|[[:alnum:]] (==|!=|<=|<<|>>|>>>|^^)[[:alnum:]]|[[:alnum:]](==|!=|<=|<<|>>|>>>|^^) [[:alnum:]]" $$(find . -name '*.d'); test $$? -eq 1 + @echo "Validate changelog files (Do _not_ use REF in the title!)" + @for file in $$(find changelog -name '*.dd') ; do \ + cat $$file | head -n1 | grep -nqE '\$$\((REF|LINK2|HTTP|MREF)' && \ + { echo "$$file: The title line can't contain links - it's already a link" && exit 1; } ;\ + cat $$file | head -n2 | tail -n1 | grep -q '^$$' || \ + { echo "$$file: After the title line an empty, separating line is expected" && exit 1; } ;\ + cat $$file | head -n3 | tail -n1 | grep -nqE '^.{1,}$$' || \ + { echo "$$file: The title is supposed to be followed by a long description" && exit 1; } ;\ + done + @echo "Check that Ddoc runs without errors" $(DMD) $(DFLAGS) -defaultlib= -debuglib= $(LIB) -w -D -main -c -o- $$(find etc std -type f -name '*.d' | grep -vE 'std/experimental/ndslice/iteration.d') 2>&1 | grep -v "Deprecation:"; test $$? -eq 1