Boost logo

Boost :

Subject: Re: [boost] Boost.Conversion review
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-08-22 14:04:15


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.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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