Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2024-04-09 15:43:08


On 09/04/2024 15:33, Boris Kolpackov via Boost wrote:
> Andrey Semashev via Boost <boost_at_[hidden]> writes:
>
>> It doesn't make sense to have to build the whole Boost into a module
>> only to pull a small part from it. I would much rather include the
>> headers I want instead.
> I actually don't think having a single/only `boost` module would be
> the right way to modularize Boost. I would suggest having a module
> per library (at least; maybe even more granular, say for Spirit,
> which is actually three libraries in one). And a single `boost`
> module that re-exports them all. Users who want all of Boost, can
> import `boost`, those like you who want to carefully manage their
> dependencies can import more granular modules. And, at least in
> build2, we only build BMIs that are actually used (imported).
>
> (This brings an interesting question: if I import `boost`, but only
> use a small subset of libraries, how do I know which ones I should
> be linking. Trial and error until there are no more unresolved symbols
> feels a bit stone age.)

Right, the currently experimental Boost.Regex module support has a hard
dependency on ICU if the latter is installed on your system,
irrespective of whether you're actually using that feature or not. 
Stone age indeed.  I probably need to split it into 2 modules just
because of that.  But that leaves you scrabbling around trying to figure
out which sources you need to link against and which not... and that's
just for one Boost library!  There's still a lot left to figure out here...

John.


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