Bug 2275 – std.utf.toUTF16z() should return const(wchar)*
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-08-09T11:52:00Z
Last change time
2015-06-09T01:21:35Z
Assigned to
bugzilla
Creator
2korden
Comments
Comment #0 by 2korden — 2008-08-09T11:52:22Z
Currently it returns const(wchar*) which renders the pointer to be unnassignable anymore:
auto p = toUTF16z("test");
p = null; // variable p cannot modify const
The same goes to toMBSz, which returns const(char*) instead of const(char)*