
On 5/19/2010 3:17 PM, Jeremiah Willcock wrote:
On Wed, 19 May 2010, Eric Niebler wrote:
On 5/19/2010 3:07 PM, Jeremiah Willcock wrote:
For non-default_domain domains I use the least common ancestor (which is what it seemed like you wanted).
That works. Something like it should also work for the family of domains rooted at default_domain, with a special case for when the result would be default_domain itself.
What about DD2 and DD3 from your tests, though? You have that combination returning DD2, which is the opposite of what I would expect from your description (if X derives from default_domain, always pick X as the result). Or am I misunderstanding something?
We have: default_domain ^ | DD2 ^ | DD3 That is, DD3 is a sub-domain of DD2, which is a sub-domain of default_domain. If you mix expressions from domains DD2 and DD3 (e.g., {DD2, DD3, DD2}), the resulting expression should be in domain DD2. It is the strongest domain that is a super-domain of all the domains in the set. If, however, we had something like this: default_domain my_domain ^ | DD2 ^ | DD3 The common domain of {DD2, DD3, my_domain} should be my_domain, because it dominates over all domains from the family rooted at default_domain. And this: default_domain ^ ^ | | DD2 my_domain ^ | DD3 Logically, you'd think that the common domain of {DD2, DD3, my_domain} should be default_domain, but I don't want that. It would strip all domain-specific behaviors from the resulting expression. By fiat, I say this is ambiguous. -- Eric Niebler BoostPro Computing http://www.boostpro.com