On Tue, Oct 28, 2025 at 07:43:56PM +0000, Bastiaan Veelo via 
Digitalmars-d-learn wrote:
> Why doesn't this compile?
> 
> ```d
> import std;
> 
> void main()
> {
>     string s;
>     //...
>     s = s.substitute!((a, b) => sicmp(a, b) == 0, "&", "&",
>                                                   "&lt;", "<",
>                                                   "&gt;", ">",
>                                                   "&quot;", `"`,
>                                                   "&apos;", "'").array;
> }
> ```

You have all your arguments as CT arguments; I think .substitute wants
the lamdba as a CT argument but the other arguments as RT.

But having said that, after changing the substitution arguments to RT
arguments, it still doesn't compile for me for some reason.  So I dunno.


T

-- 
They say that "guns don't kill people, people kill people." Well I think the 
gun helps. If you just stood there and yelled BANG, I don't think you'd kill 
too many people. -- Eddie Izzard, Dressed to Kill

Reply via email to