
On June 5, 2016 6:51:13 PM EDT, Niall Douglas
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)