www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4120] New: bigint implicit cast too bool

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

           Summary: bigint implicit cast too bool
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2010-04-24 15:49:39 PDT ---
I'd like this code to work:


import std.bigint: BigInt;
void main() {
    BigInt b = 1;
    if (b)
        int r = 10;
}

With an opCast(bool).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 24 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4120


safety0ff.bugz gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |safety0ff.bugz gmail.com


--- Comment #1 from safety0ff.bugz gmail.com 2013-03-31 16:02:05 PDT ---
https://github.com/D-Programming-Language/phobos/pull/1236

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


adamsibson hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adamsibson hotmail.com


--- Comment #2 from adamsibson hotmail.com 2013-03-31 16:40:56 PDT ---
I too would very much like to see this change, bigints have improved recently
(I think?) but are still too much of a second class citizen and often don't
work with templates where they could for reasons like this.

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



--- Comment #3 from github-bugzilla puremagic.com 2013-04-03 07:11:22 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/8ce364b44f39779a6f8c934092f3725820bb4861
BigInt enhancement: add opCast!bool to BigInt (issue 4120)

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


safety0ff.bugz gmail.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: -------
Aug 25 2013