[Issue 3288] New: conv.d : using to with cont int or long fails to compile.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 3 09:55:31 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3288
Summary: conv.d : using to with cont int or long fails to
compile.
Product: D
Version: 2.032
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: patch
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: sandford at jhu.edu
The to!string conversion template doesn't handle const int or long values i.e.
const h = 6;
string s = to!string(h); // Error
This seems to effect text, but not writeln.
Patch:
change
u /= 10;
to
u = u / 10;
inside
/// Signed values ($(D int) and $(D long)).
T to(T, S)(S value)
if (staticIndexOf!(Unqual!S, int, long) >= 0 && isSomeString!T)
Line# 2580 in dmd 2.032
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list