C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] C++ Modules and Macros

From: Boris Kolpackov <boris_at_[hidden]>
Date: Wed, 4 Dec 2024 12:24:12 +0200
Jason Merrill via SG15 <sg15_at_[hidden]> writes:

> I've been considering a built-in macro like __has_include for imports, so
> that a header can choose to skip non-macros if its contents are available
> from a module. My initial thought was to ask if 'import foo' would
> succeed, but that seems too dependent on the state of the build [...]

Well, that would fit fairly naturally into the module mapper approach:
just ask the build system. The same as how include translation works.

Received on 2024-12-04 10:23:06