Subject: Re: [boost] [qvm] deduce_xx traits wouldn't introduce ODR issues.
From: Rob Stewart (rob.stewart_at_[hidden])
Date: 2015-12-29 14:54:23
On December 29, 2015 12:52:33 PM EST, Peter Dimov <lists_at_[hidden]> wrote:
> Rob Stewart wrote:
> > Are you being purposely obtuse? If two separate libraries use one
> each of
> > the specializations, and some new application has need to use both
> > libraries, there will be an ODR violation, most likely without the
> > knowledge of the programmer combining the two libraries. The
> "validity" of
> > the reason stems from the need to use the two libraries, not from
> > specializing, or not, the QVM traits.
> No, he isn't being obtuse. It is not right for library X to override
> return type of X::m * Y::m to be X::m instead of the default,
> because if we assume that it has this right, the symmetric right of Y
> override the same to be Y::m creates a conflict.
What if the two libraries that specialize the return type are not related to the two that provide X and Y, but are, say, internal libraries used by different teams? If a third team decides to use the first two teams' libraries together, the problem arises again. The specializations would be reasonable for the first two teams. Only the third team has a problem and you can easily imagine that no one from the first two teams would think of the potential problem to warn the third team.
(Sent from my portable computation engine)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk