C++ Logo


Advanced search

Re: [SG15] [isocpp-modules] Determining identity like #pragma once

From: Tom Honermann <tom_at_[hidden]>
Date: Wed, 10 Jul 2019 15:58:04 -0400
On 7/10/19 3:47 PM, Ville Voutilainen wrote:
> On Wed, 10 Jul 2019 at 22:33, Tom Honermann <tom_at_[hidden]> wrote:
>> On 7/10/19 3:28 PM, Ville Voutilainen via SG15 wrote:
>>> On Wed, 10 Jul 2019 at 22:26, Tom Honermann <tom_at_[hidden]> wrote:
>>>> The situation arises if the implementation assumes imported headers are importable (aka import <foo> implies foo is importable).
>>>> Are we saying this is not a good implementation strategy?
>>>> I would say that such an implementation strategy is not valid given the existing wording (and my understanding of the intent of the wording from various discussions).
>>> I disagree with that. The set of importable headers is implementation
>>> defined to be "every header everywhere" in that strategy, and the
>>> wording doesn't
>>> disallow it.
>> That implementation strategy will mis-compile or reject well-formed code
>> like the following (assuming <foo> is an importable header, in some
>> cases, depending on the contents of <foo>). That is why I believe it to
>> be invalid.
>> #include <foo>
>> import <foo>;
> Hmm.. well, yeah, if the strategy is, for the set of importable
> headers, "every header everywhere", then that's again just a sequence
> of two imports.

But that would result in mis-compilation or rejection for well-formed
inclusion of non-importable headers.


Received on 2019-07-10 14:59:59