[Issue 18790] can't put a const(char)[] into a char[]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 22 05:01:04 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18790

--- Comment #7 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
(In reply to hsteoh from comment #4)
> Given that std.range.put goes out of its way to support putting single
> elements, multiple elements, and in some cases even dchars into strings, I'm
> shocked that putting dchar into char[] doesn't work. This needs to be made
> to work.

I think that what it comes down to is that because of the whole auto-decoding
fiasco, when Andrei originally did the work on output ranges, he made it so
that char[] and wchar[] were not output ranges for all of the reasons that they
weren't input ranges. However, with the improvements to put over the years, it
becomes increasingly silly for it to not work. And if we can make the changes
for output ranges without breaking any existing code, then we definitely
should.

--


More information about the Digitalmars-d-bugs mailing list