--- Comment #17 from 2011-01-23 09:26:37 PST ---
(In reply to comment #16)
> This shows something strange, dmd 2.051:

According to Mafi that code is correct:

> I think it's absolutely correct. Look: Foo3 is declared as const
> struct meaning all it's members are const. We are passing a struct
> like that to bar3:
>  const Foo3 { const int* p}
> which is implicitely converted to:
>  Foo3 { const int* p } //not ref !!
> Because it's not ref you can't manipulate the original struct anyways
> and the pointer is still const. As long as you don't cast you cannot
> change what the pointer points to so this implicit conversion is
> correct IMO.
> It's like const(T[]) => const(T)[] .

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to