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

@ -60,11 +60,15 @@ final class ConvException : Exception
*/
package T readIntegral(T, R)(ref R range, const ubyte base = 10)
if (isInputRange!R
&& isSomeChar!(ElementType!R)
&& isIntegral!T
&& isUnsigned!T)
in (base >= 2)
in (base <= 36)
&& isSomeChar!(ElementType!R)
&& isIntegral!T
&& isUnsigned!T)
in
{
assert(base >= 2);
assert(base <= 36);
}
do
{
T boundary = cast(T) (T.max / base);
if (range.empty)