Subject: Re: [boost] clang++ isn't getting the BOOST_NO_CXX11_HDR_FUNCTIONAL flag that it needs
From: Beman Dawes (bdawes_at_[hidden])
Date: 2014-04-16 09:08:58
On Tue, Apr 15, 2014 at 3:48 PM, Chris Cooper <chris.cooper_at_[hidden]>
> Trying to build & run the regression tests for boost 1.55 on my Mac using
the clang++ that comes with Xcode 5.1 ("Apple LLVM version 5.1
(clang-503.0.38) (based on LLVM 3.4svn)â), it canât build config_test.cpp
because BOOST_NO_CXX11_HDR_FUNCTIONAL isnât set, and
libs/config/test/boost_no_ccx_hdr_functional.ipp definitely doesnât build
(after renaming it to .cpp of course).
> If I set CXXFLAGS to "-std=c++11 -stdlib=libc++â everything is fine, but
I also need a build of boost that _doesnât_ use c++11, and itâs the
non-c++-11 version that is failing.
> I can get around this by manually setting CXXFLAGS to
â-DBOOST_NO_CXX11_HDR_FUNCTIONALâ but it seems like the correct way to do
this is to add a test to boost/config/compiler/clang.hpp that tests â¦
somethingâ¦ and then sets BOOST_NO_CXX11_HDR_FUNCTIONAL if appropriate.
> 1. Would you agree thatâs the right place to set
BOOST_NO_CXX11_HDR_FUNCTIONAL (when appropriate)?
The right place is .../config/stdlib/libcpp.hpp since what header is
available is a function of the library rather than the compiler.
The current version of libcpp.hpp is pretty rudimentary and doesn't test
for specific versions of libc++. You might want to read "Best way to
detect libc++ at compile time?"
It would certainly be nice to get a patch to update libcpp.hpp.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk