digitalmars.D.bugs - [Issue 4340] New: Arithmetic impossible with const BigInt
- d-bugmail puremagic.com (34/34) Jun 17 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4340
 - d-bugmail puremagic.com (10/10) Jun 17 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4340
 - d-bugmail puremagic.com (12/12) Jun 17 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4340
 
http://d.puremagic.com/issues/show_bug.cgi?id=4340
           Summary: Arithmetic impossible with const BigInt
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: pelle.mansson gmail.com
PDT ---
This program:
import std.bigint;
void main() {
    const BigInt a = 1;
    const BigInt b = a + 1;
}
gives this:
test5.d(6): Error: template std.bigint.BigInt.opBinary(string op,T) if ((op ==
"+" || op == "*" || op == "-" || op == "/" || op == "%") && is(T : BigInt))
does not match any function template declaration
test5.d(6): Error: template std.bigint.BigInt.opBinary(string op,T) if ((op ==
"+" || op == "*" || op == "-" || op == "/" || op == "%") && is(T : BigInt))
cannot deduce template function from argument types !("+")(int)
test5.d(6): Error: template std.bigint.BigInt.__ctor(T : string) does not match
any function template declaration
test5.d(6): Error: template std.bigint.BigInt.__ctor(T : string) cannot deduce
template function from argument types !()(_error_)
This is due to the opBinary being non-const in std.bigint.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
 Jun 17 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4340
bearophile_hugs eml.cc changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc
Dupe of bug 4301 ?
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
 Jun 17 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4340
Don <clugdbug yahoo.com.au> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE
*** This issue has been marked as a duplicate of issue 4301 ***
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
 Jun 17 2010








 
 
 
 d-bugmail puremagic.com 