|
Boost : |
Subject: Re: [boost] Cxx dual library
From: Rob Stewart (rstewart_at_[hidden])
Date: 2016-06-06 04:34:39
On June 5, 2016 6:51:13 PM EDT, Niall Douglas <s_sourceforge_at_[hidden]> wrote:
>On 5 Jun 2016 at 17:53, Rob Stewart wrote:
>
>> Vicente's idea was to import, say, std::thread or boost::thread into
>a
>> new, common namespace. That is, foo::thread might refer to either of
>the
>> others, based upon platform support or even an override macro.
>
>I'm sorry, I really don't understand how this is different from the
>code referred to above where boost::afio::stl::thread::thread would
>be exactly what you say.
>
>If you meant you want to import exclusively and solely the
>boost::thread type alone, you could do:
>
>namespace boost { namespace afio { namespace stl { typedef
>::boost::thread thread; } } }
>
>Is that what you meant?
I think his approach (I don't know why I'm spending so much time discussing someone else's idea of which I have only passing familiarity, but...) was the following:
namespace boost {
namespace something {
using std::thread;
// or (conditionally selected)
using boost::thread;
} }
With that, boost::something::thread is the name to use in the user's code.
___
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