std.conv.parse of string literals
    bearophile 
    bearophileHUGS at lycos.com
       
    Thu Sep  9 14:28:47 PDT 2010
    
    
  
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
    
    
More information about the Digitalmars-d-learn
mailing list