← Back to index
|
Original Bugzilla link
Bug 8480 – to!string(BigInt, base) doesn't work
Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-31T03:08:41Z
Last change time
2024-12-01T16:15:20Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: phobos#9930 →
Comments
Comment #0
by bearophile_hugs — 2012-07-31T03:08:41Z
import std.stdio: writeln; import std.conv: to; import std.bigint: BigInt; void main() { int base = 6; int n1 = 588_225; string s1 = to!string(n1, base); writeln(s1); BigInt n2 = BigInt(n1); string s2 = to!string(n2, base); writeln(s2); } Expected output: 20335133 20335133 But DMD 2.060beta prints: ...\dmd2\src\phobos\std\conv.d(268): Error: template std.conv.toImpl does not match any function template declaration ...\dmd2\src\phobos\std\conv.d(299): Error: template std.conv.toImpl cannot deduce template function from argument types !(string)(BigInt,int) ...\dmd2\src\phobos\std\conv.d(268): Error: template instance toImpl!(string) errors instantiating template temp.d(10): Error: template instance std.conv.to!(string).to!(BigInt,int) error instantiating
Comment #1
by robert.schadek — 2024-12-01T16:15:20Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/9930
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB