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

--- Comment #2 from Dominikus Dittes Scherkl <[email protected]> ---
(In reply to Nick Treleaven from comment #1)
> To do that, the compiler would have to analyse the body of the template
> function.
No. The strategy is
- create a mutable copy (as it is done for normal functions)
- only if this is not possible, create a const copy
- if a const copy is neccessary, declare the template to take a const T (or,
what I would recommend, take it by const ref T)

--

Reply via email to