Subject: Re: [boost] [qvm] deduce_xx traits wouldn't introduce ODR issues.
From: Rob Stewart (rob.stewart_at_[hidden])
Date: 2015-12-31 04:00:03
On December 31, 2015 2:42:55 AM EST, Sergey Mitsyn <svm_at_[hidden]> wrote:
> Correct me if I'm wrong, but it to me seems that the root of evil here
> is a specialization by third party library, by which I mean the case
> when template from library X is specialized with type(s) exclusively
> from library (libraries) Y (Y might be the same as X) by library Z
> (which is neither X nor Y, third party). If it's true, an ODR would be
> caused for a user even if _unary_ deduce_m (or any other deduce_X)
> be specialized by two unrelated third party libraries A and B imported
> by user.
Your point is valid except that one-type customization points are likely to be provided by the library providing the type X or Y, or by the library providing the customization point using a separate header (opt in). It's two-type customization points that exist to combine foreign types that pose an issue because they invite multiple definitions.
Bold warnings in the documentation may be the only real solution to the issue.
(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