Thread overview
[Issue 12470] std.array.replace does not work with inout(char)[]
Apr 23, 2014
Andrej Mitrovic
April 23, 2014
https://issues.dlang.org/show_bug.cgi?id=12470

--- Comment #5 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---
It seems the bottom-line problem is this:

-----
import std.array;
import std.range;

inout(char)[] sanitize(inout(char)[] input)
{
    auto app = appender!(inout(char)[])();

    // fails because of inout(char) as the element type
    static assert(isOutputRange!(typeof(app), inout(char)));
}
-----

And it fails because of this strange nested declaration inside of the put method:

@property ref E[] EArrayInit(); //@@@9186@@@: Can't use (E[]).init

std\range.d(656): Error: inout on return means inout must be on a parameter as
well for @property ref inout(char)[]()

I guess this was some kind of funky workaround, but it causes issues for 12470. I'm not sure how to proceed yet.

--
September 13, 2017
https://issues.dlang.org/show_bug.cgi?id=12470

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/722ecd878cfde16a87d1f04e2ed3f5df08a9b78d fix issue 12470 - std.array.replace does not work with inout(char)[]

https://github.com/dlang/phobos/commit/fc468500c90894919cec3783ce674f9b0f9b329e Merge pull request #5735 from BBasile/issue-12470

fix issue 12470 - std.array.replace does not work with inout(char)[]

--
September 13, 2017
https://issues.dlang.org/show_bug.cgi?id=12470

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
October 16, 2017
https://issues.dlang.org/show_bug.cgi?id=12470

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/722ecd878cfde16a87d1f04e2ed3f5df08a9b78d fix issue 12470 - std.array.replace does not work with inout(char)[]

https://github.com/dlang/phobos/commit/fc468500c90894919cec3783ce674f9b0f9b329e Merge pull request #5735 from BBasile/issue-12470

--