Boost logo

Boost :

Subject: Re: [boost] Adding libc++ support to boost.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-02-10 16:10:24


AMDG

On 2/10/2011 12:27 PM, Christopher Jefferson wrote:
> I want to add support for libc++, the c++ standard library attached to clang, to boost. Fixes required should not be attached to clang, as clang can use various standard libraries. Is there a standard way I should add the library, or just add the macro where needed.
>

You should add a header in boost/config/stdlib/
for libc++ and update boost/config/select_stdlib_config.hpp.
Other than that, patches should be applied as needed.

> The best macro to use for detecting libc++ is _LIBCPP_VERSION. Hopefully the changes required will be minimal.
>
> One place where libc++ needs to be mentioned in is detail/container_fwd.hpp, as forward declarations simply don't work. Can I just attach _LIBCPP_VERSION to:
>
> #if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
> || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
> && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
> || BOOST_WORKAROUND(__BORLANDC__,> 0x551) \
> || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
> || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
>
> Or is there a better / more offical way libc++ should be worked in?
>

In Christ,
Steven Watanabe


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