On 10/24/2018 5:21 PM, Peter Dimov via Boost wrote:
Edward Diener wrote:
I don't get this. Why can't library X, which needs C++11, depend on library Y, which needs C++03 but works fine if compiled with C++11. What am I missing here ?
I don't know how to answer this, and I don't know how it relates to what I was saying.
What I was saying is this: the user, or someone acting on his behalf such as a package maintainer, types f.ex.
b2 toolset=clang install
and obtains a prebuilt Boost.
Then the user types f.ex.
clang++ -std=c++17 myapp.cpp -lboost_pumpkin
and expects it to work. If boost_pumpkin autodetects C++11/C++14/C++17 and changes its API to match, it doesn't work.
Is not this a user problem, irrelevant of cxxstd level ? The user is given a Boost package compiled with the default cxxstd level for clang and then attempts to use it imposing his own cxxstd level. I would expect disaster in any case except when the default cxxstd level matches what the user specifically uses, regardless of what those levels ( c++03, c++11, c++14, c++17, c++20 ) actually are. I can not imagine how this can be a Boost ( or any library ) problem as opposed to a user problem.
It doesn't because step 1 builds libboost_pumpkin.a with the default -std=c++03.
Same with g++ 5.
Not same with g++ 6 and above, whose default is C++14, but still possible if the library adapts to C++17 by using f.ex. <filesystem>.