www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10680] New: BigInt uses deprecated std.traits.unsigned

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680

           Summary: BigInt uses deprecated std.traits.unsigned
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 20 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com



PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 20 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



PDT ---
https://github.com/D-Programming-Language/phobos/pull/1427

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 20 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680





 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 20 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/668087adb71c51637371967ee43a066cfdfafc83


unsigned was moved to std.conv (with a deprecated alias left in
std.traits), but std.bigint was not updated accordingly. This fixes
that.

https://github.com/D-Programming-Language/phobos/commit/4e9063b9599f206667224f6baf705b0644bb1701




-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 21 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10680


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 21 2013