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:33:02 -0400
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>;


Received on 2019-07-10 14:34:57