Boost logo

Boost :

Subject: Re: [boost] Boost.Conversion review
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-08-22 14:56:54


Le 22/08/11 20:04, Emil Dotchevski a écrit :
> On Mon, Aug 22, 2011 at 10:38 AM, Vicente J. Botet Escriba
> <vicente.botet_at_[hidden]> wrote:
>> Le 22/08/11 09:19, Gordon Woodhull a écrit :
>>> Hi Vicente,
>>>
>>> On Aug 21, 2011, at 6:31 AM, Vicente J. Botet Escriba wrote:
>>>> I have added a section to the documentation containing a possible approach that could address this issue.
>>>>
>>>> I have added it below.
>>>>
>>>> Best,
>>>> Vicente
>>>>
>>>> How can libraries define and use conversions between unrelated types?
>>> Do I understand that there would be the same problem and possible solution for an overloadable static_cast?
>>>
>>> I think the rule you're proposing could be summarized as: the end user must choose which conversions are defined. Thus,
>>> 1. The end user can define and use conversions in any way as long as they heed the ODR.
> It might be possible to abuse unnamed namespaces to avoid violating ODR.
>
>
>
Hi,
The needed overload is dependent on the namespace of the types, and the
trait specialization must be on boost::conversion. Could you clarify how
could unamed namespaces help on this?

Best,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk