Boost logo

Boost :

Subject: Re: [boost] [qvm] deduce_xx traits wouldn't introduce ODR issues.
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2015-12-23 17:44:55

Emil Dotchevski wrote:
> On Wed, Dec 23, 2015 at 6:24 AM, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]>
> wrote:
>> Vicente J. Botet Escriba wrote:
>>> Le 10/12/2015 08:30, Emil Dotchevski a écrit :
>>>> On Wed, Dec 9, 2015 at 10:36 PM, Vicente J. Botet Escriba <
>>>> vicente.botet_at_[hidden]> wrote:
>>>> Le 10/12/2015 00:15, Emil Dotchevski a écrit :
>>>>> On Wed, Dec 9, 2015 at 2:51 PM, Vicente J. Botet Escriba <
>>>>>> vicente.botet_at_[hidden]> wrote:
>>>>>> The problem appear when two such programmers do it (think of 3pp).
>>>>> If within one program two programmers introduce two different
>>>>> definitions
>>>> under the same name, yes you have ODR but that is hardly a library
>>>> problem.
>>>> :)
>>>> Hmm. This is a library issue, because the library provides an interface
>>> that allows to configure types that don't know each other by two different
>>> parts.
>>> TBoost.Conversion was rejected exactly by this reason.
>> This indeed is an important point, unfortunately I cannot take it into
>> account because it wasn't mentioned in any review.
>> Vincente, do you plan to write one?
> If the problem is that QVM allows you to specialize a type template, and
> that it is possible for two programmers to introduce two different
> definitions for the same specialization, how is that a library issue? If
> that's a problem then we can't allow any templates in any library
> interface, which seems odd.

Basically I think we should clarify this. AFAIU the problem might occur
if there were e.g. two libraries (abc and def) providing their own
matrix representations (e.g. abc::mat4x4 and def::mat4x4). Then we'd
have two other libraries (X and Y) both using those two matrix types
together with QVM. So both X and Y libraries would have to specialize
QVM traits for abc::mat4x4 and def::mat4x4. Then, if both X and Y
libraries were included in a program there would be problems since the
specializations of QVM traits would be duplicated. I'm not sure if we
could do anything about it because similar problem would occur every
time when any traits was required by any library. So AFAIU this is what
Emil is saying.

Or are deduce_xx traits somehow different than other QVM traits?

Vincente is this what you had in mind or was it a different issue?


Boost list run by bdawes at, gregod at, cpdaniel at, john at