Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2025-01-13 16:04:58


On 12/01/2025 20:51, Ruben Perez via Boost wrote:
> Hi all,
>
> I finally have something workable regarding Boost and C++20 modules.
> I've described it in detail in this article [1], but here's a rough
> summary:

Wow, thank you for this, that's a brilliant first step and proof of
principle.

I have a few comments, many of which are about things over which we/you
have no control!

1) Are the CMake files usable with older CMake versions?

2) The lack of Visual Studio generators for CMake is annoying: by far
the best user experience is likely to come from Visual Studio
integration as that handles module dependencies very well.

3) The need for a separate object file even for header only libraries is
annoying, it leads to all kind of issues:

3a) We're going to end up generating an awful lot of module import
initializer libraries.

3b) Using Boost with modules may be untenable, without using CMake to
handle the dependencies: given that Boost.Whatever may have no end of
dependencies all of which will need to be manually specified on the
command like otherwise.  For a large project with multiple Boost
dependencies things explode even further.  We're between a rock and hard
place here, as I don't see a single monolithic Boost module as a good
solution either.  But as things stand, building a trivial hello-world
using-boost-as-module app from the command line could well be a no-no.

3c) I wonder what impact a dependency on lots of small modules will have
on build times: both pre-compile module dependency-scanning phase, and
linking to all those micro-libraries.

Best, John.


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