What functions can be called on a shared struct that's implicitly castable to immutable?
deadalnix
deadalnix at gmail.com
Tue Nov 5 19:59:14 PST 2013
On Wednesday, 6 November 2013 at 03:07:08 UTC, Simen Kjærås wrote:
> I cannot for the life of me see how my suggestion violates SC,
> and you even seem to say it doesn't ("making a copy is fine").
> Are you arguing about something other than what I'm arguing
> about?
Calling member function is a pass by reference. The reference is
shared. SO you can't call a pure const method on a shared object.
You can pass a shared object by value to a function expecting a
const (as long as it do not contains indirection and is copyable).
More information about the Digitalmars-d
mailing list