enum type changes according to context ?
cal
callumenator at gmail.com
Thu Mar 28 16:33:50 PDT 2013
On Thursday, 28 March 2013 at 23:02:31 UTC, Timothee Cour wrote:
> In code below, does transTable have a well defined type?
> it seems to change from line 9 (string[char])
> to line 10 (string[dchar])...
My guess:
The enum version is like saying this:
auto s = translate("[", ['[' : `\[`]);
here the literal gets implicitly converted to string[dchar]. The
auto version is inferred as string[char], so compilation fails.
More information about the Digitalmars-d-learn
mailing list