On Sunday, 30 June 2013 at 07:27:06 UTC, TommiT wrote:
[..]case 1: void foo(const S s) { S m = cast(S) s; s.values[0] = 42; }
A typo. It should be:
case 1:
void foo(const S s)
{
S m = cast(S) s;
m.values[0] = 42;
}
On Sunday, 30 June 2013 at 02:20:24 UTC, Diggory wrote:
Unless the function is pure, this is only possible for [..]
I don't see what kind of a difference the pureness of foo would make in either of those two cases I wrote about in my previous post.
