--- Comment #6 from Andrei Alexandrescu <> 2009-11-14 
06:10:08 PST ---
(In reply to comment #5)
> This has some tricky points. The first is that it's recursive. As well as
> structs, it also applies to fixed-length arrays: if either contains a struct
> with an opEquals, the entire struct must be compared member-by-member; and 
> this
> check must be performed recursively.

Correct - more precisely, transitive for direct fields. I think the comparison
should simply call a template object.structCompare that we define as a library

> Secondly, what happens with unions?
> struct Rectangle {
>    union {
>       Point leftBottom;
>       int problematic;
>    }
> }
> I think this should probably be an error.

I think so too.

> The third difficult part relates to protection. Any of the struct members may
> be private and defined in a different module.
> If a field in the struct is a class, it probably applies to it as well.

I'm not sure how to address this.

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

Reply via email to