Overload resolution for string
acehreli at yahoo.com
Sun Apr 11 12:33:09 PDT 2010
My previous question was in the context of overloading opEquals. Here it
is again in a simpler form.
void foo(const(char) s)
void foo(const(wchar) s)
void foo(const(dchar) s)
deneme.d(10024): Error: function deneme.foo called with argument types:
Adding overloads for string, wstring, and dstring does not help. Same
Replacing "hello" with either of "hello"c, "hello"w, or "hello"d fixes
This is a bug, right? I've been assuming that unqualified string
literals were immutable char arrays, but the behavior is different
between "hello" vs. "hello"c.
Am I missing something?
More information about the Digitalmars-d-learn