Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2024-04-09 12:05:01


> On 09.04.24 11:25, Daniela Engert via Boost wrote:
> > Right, and this precludes any non-trivial use of 'import std' when you
> can't control *all* dependencies in their entirety. You need to guarantee
> that *all* #includes of header files lexically appear before all imports
> that directly or indirectly depend on those same header files. In *all*
> translation units.
>
> I don't see what's so difficult about this requirement. Just put your
> #includes above your imports, and don't use imports in header files.
> Header-based code will automatically follow these rules by virtue of not
> using imports. Module-based code will naturally follow these rules by
> virtue of not using header files, and by putting the #includes above the
> imports. Or am I missing something here?
>

What I understood (please correct me if I'm wrong) is that importing a
module that uses an include in its global module fragment and then
importing another module does violate this rule.

>
> --
> Rainer Deyke (rainerd_at_[hidden])
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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