C++ Logo


Advanced search

Re: [isocpp-ext] Can we expect that all C++ source files can have the same suffix?

From: Daniel Ruoso <daniel_at_[hidden]>
Date: Mon, 25 Apr 2022 14:01:51 -0400
Em seg., 25 de abr. de 2022 às 13:55, Peter Dimov <pdimov_at_[hidden]> escreveu:
> The question here is would it be possible,
> in the brave new module world, for the system package manager to install
> some things somewhere such that `import <boost/regex.hpp>` or
> `import boost.regex` works as well as #include works today.

The answer is "no". Modules are way more complex than that. We've been
working in SG15 since July last year trying to figure out how to make
Pre-built C++ Module Libraries work, and we don't have a consensus on
that yet. The idea of "interface-unit-only libraries" is not
well-defined at this point, because it's not as simple as "it's
available in the default system path".

The fact is that modules introduced a few orders of magnitude in new
complexity, and while the trivial case 'barely worked' before modules,
with modules they go beyond what was achievable with an
over-simplistic approach. IOW, you *need* a build system.

It may as well be the case that we need the technical report to
include a proposed "minimal build system requirement", and that we'll
need to convince toolchain providers to build that.

But "because it worked with headers it must work with modules" is an
unrealistic expectation.


Received on 2022-04-25 18:02:03