Boost logo

Boost :

Subject: Re: [boost] [type_erasure] ODR violation promotion
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-09 14:44:57


On 09/09/2011 11:23 AM, Vicente J. Botet Escriba wrote:
> I'm interested in your TypeErasure library. Where can I find the on
> going version?

I've been keeping the repository on my own
machine. I'll push it in to the sandbox

> The example for concept map seams not complete, as the specialization
> for less_than_comparable<std::type_info> is not used in any type erasure
> type. Could you complete it?

What more do you want to see?

Something like this:

    any<less_than_comparable<>, _self&> t1(typeid(int));
    any<less_than_comparable<>, _self&> t2(typeid(double));
    bool b = t1 < t2; // b == typeid(int).before(typeid(double))

I had assumed that this would be obvious. I'd
rather not clutter the examples too much. The
important part is the specialization.

> Before the Boost.Conversion review someone signaled that the
> Boost.Conversion review was promoting ODR violations as two libraries
> could specialize a conversion for types S and T and make them
> incompatible for an end user as the ODR is violated.
> I think that your library suffer from the same issue, when two libraries
> need to specialize a concept provided by the library for a 3rd part
> concrete class using the proposed concept map mechanism. Do you agree?
> If not, how do the library avoids this kind of issue?

I have no intention of trying to deal with it.
As far as I'm concerned it's the responsibility
of whoever defines the specializations. I'm
not going to worry about it at all until I
hear reports of it causing real problems, as
opposed to being a purely theoretical concern.

In Christ,
Steven Watanabe

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