On Sunday, 13 October 2013 at 22:34:00 UTC, Temtaime wrote:
I've found another one inconsitency problem.
void foo(const char *);
void foo(const wchar *);
void foo(const dchar *);
void main() {
foo(`123`);
foo(`123`w);
foo(`123`d);
}
Error: function hello.foo (const(char*)) is not callable using
argument types (immutable(wchar)[])
Error: function hello.foo (const(char*)) is not callable using
argument types (immutable(dchar)[])
And typeof(`123`).stringof == `string`. Why `123` can be stored
as null terminated utf8 string in rdata segment and `123`w nor
`123`d are not? For example wide strings(utf16) are usable with
windows *W functions.
The first one is made to interface with C. It is a special case.