digitalmars.D.learn - std.conv.parse of string literals
- bearophile (12/12) Sep 09 2010 This is a small D2 program that uses parse:
- Andrej Mitrovic (3/5) Sep 09 2010 This might be related to that bug report you wrote where you could
- bearophile (4/6) Sep 09 2010 Right. And recently there's another similar bug report in Bugzilla. So I...
This is a small D2 program that uses parse: import std.conv: parse; void main() { parse!int("111"); parse!int("111"); } Gives the error: std.conv.ConvError: std.conv(1122): Can't convert value `' of type string base 2 to type int But a string literal isn't a lvalue. This seems all wrong. In Bugzilla there are related bugs about strings. Do you think this is worth another bugzilla entry? Bye and thank you, bearophile
Sep 09 2010
This might be related to that bug report you wrote where you could assign one string literal to another. bearophile Wrote:But a string literal isn't a lvalue. This seems all wrong.
Sep 09 2010
Andrej Mitrovic:This might be related to that bug report you wrote where you could assign one string literal to another.Right. And recently there's another similar bug report in Bugzilla. So I may add this case just to one of those bug reports. Bye, bearophile
Sep 09 2010