D-Programming-Language/phobos — pull request #611 by jmdavis (2012-05-29 09:20:40+00:00)
Title: Some tweaks to unsigned.

unsigned was severely lacking in unit tests. This remedies that. It also
makes its return types more consistent. Previously, in the case of
signed values, the return type was their Unqualed, unsigned counterpart,
whereas in the case of unsigned values, the return type was exactly the
same as the type passed in. Now, it's the Unqualed, unsigned type in all
cases.

My one concern here is whether `unsigned` should always return the Unqualed version or always return a type with exactly the same attributes but unsigned instead of signed. Since, it's dealing with value types which implicitly convert to their const, immutable, and/or shared counterparts, I believe that it's fine to return the Unqualed version, but someone might else might be able to come up with a reason why that isn't so. Regardless, this _will_ affect code which calls `unsigned` with an unsigned type and uses auto. There's no avoiding that.