Boost logo

Boost :

Subject: Re: [boost] [log] [asio] Conflicting default configs
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-03-31 08:30:03


On 31 Mar 2015 at 11:38, Andrey Semashev wrote:

> > If you can tweak the namespace it uses to be something inside boost::log
> > rather than whatever it defaults to, that should help avoid collisions
> > between Boost.Log and either Boost.Asio or the user using standalone
> > ASIO themselves.
>
> Hmm, this made me thinking if I could #include Boost.ASIO headers inside a
> namespace. Sounds hackish and certainly not the expected use case by ASIO
> developers, but it could work.

Boost.ASIO is auto generated by a script from standalone ASIO. Some
of the things it does is to wrap the asio namespace with a boost
namespace, the ASIO_ macros with a BOOST_ prefix and so on.

Tweaking that script to prepend a log_internal namespace and a
BOOST_LOG_INTERAL_ instead should be trivial. I'd have your build
system optionally git clone the standalone ASIO repo and optionally
refresh a locally kept copy.

BTW Boost.ASIO lags standalone ASIO by up to a year. They are not ABI
compatible. Indeed right now standalone ASIO has deprecated
null_buffers, so any code using null_buffers (surely a lot) is
considered legacy. Or put another way, the Networking TS won't have
null_buffers.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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