C++ Logo

sg15

Advanced search

Re: [Tooling] [isocpp-modules] Dependency format with module details implementation

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Fri, 12 Apr 2019 12:06:19 -0400
On Fri, Apr 12, 2019 at 17:40:07 +0200, Boris Kolpackov wrote:
> Ben Boeckel via Modules <modules_at_[hidden]> writes:
>
> > This is fine because `import <hello/core.hpp>;` is semantically the
> > same as `#include <hello/core.hpp>` *for the purposes of preprocessing*.
>
> I don't think this is correct. There is at least the difference
> in macro isolation. Consider:
>
> #define NDEBUG
> #include <hello/core.hpp> // Affected by NDEBUG.
>
> And:
>
> #define NDEBUG
> import <hello/core.hpp>; // Isolated from NDEBUG.

Ah, true. However, the preprocessor can still figure this out. Still no
BMI necessary.

--Ben

Received on 2019-04-12 18:06:37