Subject: Re: [boost] [qvm] deduce_xx traits wouldn't introduce ODR issues.
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2015-12-09 18:15:52
On Wed, Dec 9, 2015 at 2:51 PM, Vicente J. Botet Escriba <
> I wonder if the deduce_xx traits wouldn't introduce ODR issues. Remember
> the TBoost.Conversion library where conversion between two types was
> The fact that deduce_xx traits have two types would promote ODR as there
> is no one type that is expected to do the customization.
> I believe that changing the default to something depending on the first
> argument will be better than using the specific qvm type as result.
If I understand your concern correctly, you're saying that if one type
defines a deduce_m2 specialization, it might clash with specializations
defined by other types. That isn't possible because deduce_m2 is always
specialized for *two* (different) types.
For example, two different matrix types (say, Mat44 and float44) would not
"know" about each other; the programmer who needs to bring the two types
together into the same program (and wants to be able to multiply a Mat44 by
a float44) could specialize deduce_m2 to specify what type of matrix he
wants (by default he'll get a suitable instantiation of the qvm::mat
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk