Boost logo

Boost :

Subject: [boost] Adding libc++ support to boost.
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-02-10 15:27:22


Hello,

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.

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?

Chris


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