[boost] Use Boost Container as PMR for Boost Cobalt #26059
+31
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes to recipe: boost/[>=1.84]
Motivation
The Boost Cobalt not only need Boost containers by default, but also need polymorphic allocator feature. Such feature requires Clang 16, GCC 9 and MSVC 192 (see https://en.cppreference.com/w/cpp/compiler_support/20). The main problem is start filtering again which compiler has/no the feature available.
Still, Boost Cobalt has a exposed feature to elect which PMR should be used: https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L23
Right now, the current Conan recipe for Boost, does not forward any define, resulting that users will try to consume from <memory_resource> always: https://github.com/boostorg/cobalt/blob/boost-1.86.0/include/boost/cobalt/config.hpp#L38
However, we can use Boost Container (it's a dependency of Cobalt already) to provide such feature, so we do not need to manage it.
Another proposal would be exposing it as a recipe option, but too much IMO, as it will affect the package ID and Cobalt is a new library.
fixes #22548
closes #25831
Details
The current build using Clang 15 (Tried first with Clang 14, but is broken for C++20 on Linux), with Cobalt active:
boost-1.86.0-linux-cobalt.log
This PR should conflict to #26030. I hope the #26030 get merged first.