Boost logo

Boost :

Subject: Re: [boost] Cxx dual library
From: Rob Stewart (rstewart_at_[hidden])
Date: 2016-06-05 17:55:03


On June 4, 2016 10:59:16 PM EDT, Edward Diener <eldiener_at_[hidden]> wrote:
>On 6/4/2016 9:28 PM, Rob Stewart wrote:
>>
>> Edward, you've missed that Vicente doesn't see that importing either
>a Boost or a Standard Library solution, into a common namespace
>requires anything more of the user.
>>
>> The user would always use the new, common namespace name for
>something, regardless of its original namespace. For example, foo::x is
>the common name, but x may have been introduced into the foo namespace,
>by a using directive, from the boost or the std namespace.
>>
>> In the end, the user always includes the foo header and uses the foo
>name. There are no macros in the user's code. Both solutions select one
>implementation or the other. Yours refers to the namespace of the
>selected implementation with a macro, while his just uses namespace
>foo.
>
>It does involve more work and macros are still being used, although not
>
>to name the namespace. I honestly think that CXXD's solution is cleaner
>
>and more flexible. Lifting constructs which are normally accessed
>through one namespace to another namespace in that way seems to me a
>kludge. I am not sure of all the ramifications of doing this but I
>would
>be wary of doing such a thing myself.
>
>You also don't have the technique of overriding the dual library choice
>
>that you have with CXXD, unless you manually change some source, which
>you may not have access to in the first place. But if you think the
>CXXD
>macros are going to cause problems, just because they are macros and
>therefore "evil', by all means roll your own solution as Vicente has
>done.

See whether you still think so after reading my reply to Niall.

___
Rob

(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