Replace short preconditions in the main package

This commit is contained in:
2021-05-25 09:03:00 +02:00
parent b62cbb0647
commit 938a1bb5b4
23 changed files with 1024 additions and 295 deletions

View File

@ -562,7 +562,11 @@ if (isFloatingPoint!F)
*/
H pow(I, G, H)(in auto ref I x, in auto ref G y, in auto ref H z)
if (isIntegral!I && isIntegral!G && isIntegral!H)
in (z > 0, "Division by zero")
in
{
assert(z > 0, "Division by zero");
}
do
{
G mask = G.max / 2 + 1;
H result;

View File

@ -92,7 +92,10 @@ abstract class EntropySource
* $(D_PARAM output) length.
*/
Nullable!ubyte poll(out ubyte[maxGather] output) @nogc
out (length; length.isNull || length.get <= maxGather);
out (length)
{
assert(length.isNull || length.get <= maxGather);
}
}
version (CRuntime_Bionic)