C++ Logo

sg15

Advanced search

Re: P2898R0: Importable Headers are Not Universally Implementable

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 24 May 2023 11:44:12 +0000
The MSVC implementation of the spec is that what #include to translate to import comes from a user specified list, either explicitly or implicitly through the provision of BMI mapping.

Having a user-supplied list is essential for incremental adoption and “debugging” – people have very creative ways of making macros interacts with header inclusions, and it ought to be possible to iteratively include or exclude headers to be translated.

-- Gaby

From: SG15 <sg15-bounces_at_[hidden]> On Behalf Of Daniel Ruoso via SG15
Sent: Tuesday, May 23, 2023 9:49 PM
To: sg15_at_[hidden]
Cc: Daniel Ruoso <daniel_at_[hidden]>; Tom Honermann <tom_at_[hidden]>
Subject: Re: [SG15] P2898R0: Importable Headers are Not Universally Implementable

On Wed, May 24, 2023, 00:40 Corentin Jabot via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:
Maybe having only include rewrite of a list of importable headers (which you could elect to keep empty) offers a more generally applicable migration path, than addition exposing an import grammar to users ( for importable headers)

That is my current opinion. If this optimization is useful in limited situations we need a specification that allows that optimization to happen in the limited cases where it can work.

The current specification forces the support of those semantics in places where it has no hope of working sensibly.

My suggestion is that we walk back the current spec, and go back to design something that allows the optimization in a well defined way.

Daniel

Received on 2023-05-24 11:44:15