Subject: Re: [boost] [system] Header-only Boost.System by default ?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-10-10 21:58:01
On 10/10/2017 20:40, Mike Gresens via Boost wrote:
> So, what would happen if boost::system uses aliases to std if we have a
> modern >= C++11 compiler?!
> We would have no dependency to libboost_system.so
> So it's like a header only library.
> Linking to libstdc++ (or libc++, ...) is always necessary - so no issue.
Libraries can and do link to libstdc++.a, not libstdc++.so. That causes
multiple std error categories to appear there also.
Additionally, one can load a library linked to libstdc++.so via
RTLD_LOCAL, so a second copy of libstdc++.so appears, complete with a
duplicated set of std error categories.
You're probably beginning to see why WG21 hasn't fixed this yet. All of
these are problems in systems not under the control of WG21. The only
proper way to fix them is for WG21 to embrace the nuclear bomb of
implementing its own binary executable format and dynamic loader. The
Modules TS is like step 1 of a 20 step program to reach that end goal.
Incidentally, MSVC did fix this in VS2015. MSVC is the only platform
whose std error categories work right in all circumstances.
-- 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