Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2024-04-08 19:21:17


>
>
> > One other thing that isn't clear is how modules interact with compiled
> > libraries. I don't suppose modules will replace static/shared libraries,
> > so I presume a module will be added on top of the library? How should it
> > "export" the symbols that are already exported from the compiled library
> > then?
>
> If you want separately compiled source files to be usable with classic
> headers or named modules equally, this is possible. In MSVC we've achieved
> this for the Standard Library by using extern "C++"​. (We're still working
> on handling having both classic includes and named module imports within a
> single TU; that's the most challenging case. As of VS 2022 17.10, including
> an STL header before import std;​ works, but not the other way around.)
>

I have questions regarding this - maybe you can help me here:
* Let's say I build a Boost module. This #include's std headers in its
global module fragment.
* Now the user compiles their main.cpp, and they import boost and the std
modules. No includes here.

Is this scenario supposed to work? If it is, is it supposed to be portable
(i.e. defined by the standard)?

Thanks,
Ruben.


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