import core.stdc.stdio;
void main()
{
wchar* p = null;
printf("%ls\n", p); // compiles
const(wchar)* cp = null;
printf("%ls\n", cp); // complains
}
printf_test.d(9): Deprecation: argument `cp` for format specification `"%ls"` must be `wchar_t*`, not `const(wchar)*`
printf_test.d(9): Deprecation: argument `cp` for format specification `"%ls"` must be `wchar_t*`, not `const(wchar)*`
works if wchar_t is used, but this is just an alias to wchar on Windows.
Comment #1 by robert.schadek — 2024-12-13T19:16:32Z