Boost logo

Boost :

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


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:

   || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
       && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
   || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
   || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))

Or is there a better / more offical way libc++ should be worked in?


Boost list run by bdawes at, gregod at, cpdaniel at, john at