[Issue 18780] Inconsistent behavior with Variant holding int converting to unsigned types
https://issues.dlang.org/show_bug.cgi?id=18780 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Dlang Bot --- dlang/phobos pull request #7954 "Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types" was merged into master: - 7afc9bff9d0547155a0e4a2755babcbe56599631 by berni44: Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types https://github.com/dlang/phobos/pull/7954 --
[Issue 18780] Inconsistent behavior with Variant holding int converting to unsigned types
https://issues.dlang.org/show_bug.cgi?id=18780 --- Comment #3 from Dlang Bot --- @berni44 created dlang/phobos pull request #7954 "Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types" fixing this issue: - Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types https://github.com/dlang/phobos/pull/7954 --
[Issue 18780] Inconsistent behavior with Variant holding int converting to unsigned types
https://issues.dlang.org/show_bug.cgi?id=18780 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #2 from Dlang Bot --- @berni44 created dlang/phobos pull request #7842 "Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types" fixing this issue: - Fix Issue 18780 - Inconsistent behavior with Variant holding int converting to unsigned types https://github.com/dlang/phobos/pull/7842 --
[Issue 18780] Inconsistent behavior with Variant holding int converting to unsigned types
https://issues.dlang.org/show_bug.cgi?id=18780 monkeywork...@hotmail.com changed: What|Removed |Added CC||monkeywork...@hotmail.com --- Comment #1 from monkeywork...@hotmail.com --- Looks like the problem is with std.traits.ImplicitConversionTargets: pragma(msg, ImplicitConversionTargets!int); //(long, ulong, float, double, real) But it appears to be intentional. From ImplicitConversionTargets: Note: The possible targets are computed more conservatively than the language allows, eliminating all dangerous conversions. For example, `ImplicitConversionTargets!double` does not include `float`. template ImplicitConversionTargets(T) { static if (is(T == bool)) else static if (is(T == int)) alias ImplicitConversionTargets = AliasSeq!(long, ulong, CentTypeList, float, double, real); else static if... } I don't know if it's better to change Variant or create a new, more permissible version of ImplicitConversionTargets. --