mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Replace use of T.min to determine signedness with std.traits.isUnsigned.
This commit is contained in:
parent
5c2448ecb5
commit
85bccdb9ab
1 changed files with 4 additions and 4 deletions
|
@ -935,14 +935,14 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
if (is(typeof(T.max) : uint) && T.min == 0 && convertsTo!(uint))
|
||||
if (is(typeof(T.max) : uint) && isUnsigned!T && convertsTo!(uint))
|
||||
result = mixin("get!(uint) " ~ op ~ " other");
|
||||
else if (is(typeof(T.max) : int) && T.min < 0 && convertsTo!(int))
|
||||
else if (is(typeof(T.max) : int) && !isUnsigned!T && convertsTo!(int))
|
||||
result = mixin("get!(int) " ~ op ~ " other");
|
||||
else if (is(typeof(T.max) : ulong) && T.min == 0
|
||||
else if (is(typeof(T.max) : ulong) && isUnsigned!T
|
||||
&& convertsTo!(ulong))
|
||||
result = mixin("get!(ulong) " ~ op ~ " other");
|
||||
else if (is(typeof(T.max) : long) && T.min < 0 && convertsTo!(long))
|
||||
else if (is(typeof(T.max) : long) && !isUnsigned!T && convertsTo!(long))
|
||||
result = mixin("get!(long) " ~ op ~ " other");
|
||||
else if (is(T : float) && convertsTo!(float))
|
||||
result = mixin("get!(float) " ~ op ~ " other");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue