Similar to issue 23488, but less urgent for me because I don't use wchars.
struct R
{
wstring s = "😈";
bool empty() { return s.length == 0; }
wchar front() { return s[0]; }
void popFront() { s = s[1 .. $]; }
}
void main()
{
import std.format: sformat;
char[4] buf;
assert(sformat(buf, "%s", R()) == "😈"); /* fails; should pass */
}
Comment #1 by robert.schadek — 2024-12-01T16:40:43Z