Comment #0 by bearophile_hugs — 2013-07-20T07:58:34Z
I think unsigned() is a trait, so it should be in std.traits. But in the meantime there is this small problem:
import std.bigint: BigInt;
void main() {
BigInt(1);
}
DMD 2.064alpha gives:
...\dmd2\src\phobos\std\bigint.d(534): Deprecation: alias std.traits.unsigned is deprecated - unsigned has been moved to std.conv. Please adjust your imports accordingly.
Comment #1 by issues.dlang — 2013-07-20T11:58:03Z
Traits are eponymous templates which tell you a trait of a type or symbol - i.e. give you some kind of information about it. unsigned does nothing of the sort. It's a function which casts to the unsigned version of an integral type. It's a conversion function and as such makes perfect sense in std.conv. It was discussed when the pull for that was made, and the decision was made to move it into std.conv, because it fits better there.
Comment #3 by bearophile_hugs — 2013-07-20T12:15:37Z
(In reply to comment #1)
> Traits are eponymous templates which tell you a trait of a type or symbol -
> i.e. give you some kind of information about it. unsigned does nothing of the
> sort. It's a function which casts to the unsigned version of an integral type.
> It's a conversion function and as such makes perfect sense in std.conv. It was
> discussed when the pull for that was made, and the decision was made to move it
> into std.conv, because it fits better there.
Right, thank you.
Comment #4 by github-bugzilla — 2013-07-21T05:40:12Z