Boost logo

Boost :

From: Chuanqi Xu (chuanqi.xcq_at_[hidden])
Date: 2025-01-13 02:49:13


> Of course if you do that you're no longer insulated from which libraries
are modular and which aren’t.
Yeah, this is my point. As a user, I don’t mind some additional typings but prefer to see things explicitly and clearly.
Thanks,
Chuanqi
------------------------------------------------------------------
From:Peter Dimov <pdimov_at_[hidden]>
Send Time:2025 Jan. 13 (Mon.) 10:29
To:Chuanqi<chuanqi.xcq_at_[hidden]>; Peter Dimov via Boost<boost_at_[hidden]>
Subject:RE: [boost] Interest for C++20 modules support of boost officially
Chuanqi Xu wrote:
> > Rather, my current thinking is that we want this for user code:
>
> > #include <boost/mp11/this.hpp>
> > #include <boost/core/that.hpp>
> > #include <standard_header>
>
>
>
> On the one hand, I feel the readability is not so good. On the other hand, the
> standard wording may not want this:
>
>
> > In a module unit, all module-import-declarations and export-declarations
> exporting module-import-declarations shall appear before all other
> declarations in the declaration-seq of the translation-unit and of the private-
> module-fragment (if any).
That's in a module unit, which the above isn't.
In a module unit, you'd just write
import boost.mp11;
import boost.core;
import std;
because you know you're using modules.
Of course if you do that you're no longer insulated from which libraries
are modular and which aren't.
If the abovementioned headers are written "correctly", the requirement
can be met even with the include form, provided that the includes are
sorted so that all modular libraries come before all non-modular ones.
This is the reverse of the usual order though.


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