Boost logo

Boost :

From: Mike (mike.dev_at_[hidden])
Date: 2020-08-23 07:08:06


> Gesendet: Sonntag, 23. August 2020 um 00:40 Uhr
> Von: "Zach Laine via Boost" <boost_at_[hidden]>
> An: "Boost mailing list" <boost_at_[hidden]>
> Cc: "Zach Laine" <whatwasthataddress_at_[hidden]>
> Betreff: Re: [boost] Modules
>
> On Fri, Aug 21, 2020 at 1:54 PM Damian Vicino via Boost
> <boost_at_[hidden]> wrote:
> >
> > Hi,
> > Are there any guidelines on the use of modules inside boost?
> > Are we planning any steps for adoption of them?
>
> Modules are pretty hard for most Boost libs to adopt. Consider how
> many times we have code like this:
>
> #if BOOST_LIBNAME_DO_WHATEVER
> some_code;
> #else
> come_other_code;
> #endif
>
> That cannot exist inside a module. The net result is that your code
> has to be all the same lexically -- for all compilers and platforms --
> if it is in a module.

Are you sure? I've never hear of such a restriction.
And it imho doesn't make sense. Why would a compilation process on my Linux machine care, what I'm compiling on my windows machine?

I'm probably misunderstanding what you are saying- can you give an example of code that will not compile with modules?

I think the real problem is that - due to the structural differences it may not be possible to conditionally turn a header file into a module interface unit just with a bunch of #ifdefs in a convenient manner, and even if you could, code using boost modules could not coexist with code using boost headers.
However, you should be able to do the same as other legacy libraries: Make sure your headers can be used as header units and/or provide a wrapper module for each library.

Mike

>
> Zach
>
> _______________________________________________
> 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