We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
bearophile_hugs reported this on 2012-07-31T03:08:41Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=8480
Description
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 instantiatingThe text was updated successfully, but these errors were encountered: