Date: Wed, 10 Jul 2019 15:23:19 -0700
FWIW my impression was that LEWG understood that P1502R0 implies that
standard library includes will always get translated.
(While I did raise concerns about the implications of this, I
wholeheartedly support P1502R0)
On Wed, Jul 10, 2019 at 3:15 PM Michael Spencer <bigcheesegs_at_[hidden]> wrote:
>
> On Wed, Jul 10, 2019 at 2:51 PM Gabriel Dos Reis via SG15 <sg15_at_[hidden]> wrote:
>>
>>
>>
>> | -----Original Message-----
>> | From: Bryce Adelstein Lelbach aka wash <brycelelbach_at_[hidden]>
>> | Sent: Wednesday, July 10, 2019 2:37 PM
>> | To: Gabriel Dos Reis <gdr_at_[hidden]>
>> | Cc: Tom Honermann <tom_at_[hidden]>; modules_at_[hidden];
>> | sg15_at_[hidden]
>> | Subject: Re: [isocpp-modules] [SG15] Determining identity like #pragma once
>> |
>> | On Wed, Jul 10, 2019 at 11:02 AM Gabriel Dos Reis <gdr_at_[hidden]>
>> | wrote:
>> | >
>> | > You are implying that the include translation is mandatory. Is that your
>> | argument?
>> |
>> | It is my belief that include translation is mandatory.
>> |
>> | "If the header identified by the header-name denotes an importable
>> | header ([module.import]), the preprocessing directive is instead
>> | replaced by the preprocessing-tokens: import header-name ;"
>> | https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is
>> | %2Fc%2B%2Bdraft%2Fcpp.include%237&data=02%7C01%7Cgdr%40mic
>> | rosoft.com%7C57adb75b608743ebf6e208d7057ed5d4%7C72f988bf86f141af
>> | 91ab2d7cd011db47%7C1%7C0%7C636983914618863287&sdata=JsvGf
>> | 0RfvcjOSMF6q%2FfsW60hhKx5TI%2F1K42M8PdRbOU%3D&reserved=0
>> |
>> | To me, that reads as "including an importable header must be
>> | translated to an import".
>> |
>> | Was that the original design intent?
>>
>> The original intent, as I understood it, was to *permit* include translation.
>>
>> A mandatory include translation is practically unworkable for the MSVC audience. I wouldn't be surprised at all if that is the case of other compilers too.
>>
>> A permission, as opposed to a requirement, would allow adoption of header import as better and principled replacement of PCH. Otherwise, it would create more problems than it solves.
>>
>> -- Gaby
>>
>
> I was there for most of the LEWG discussion on D1502R0 (Standard library header units for C++20), and I can not say with confidence that the room understood the implication that this would require include translation. There don't seem to be any minutes of the discussion on the wiki.
>
> However, the paper does explicitly point this out:
>
> > This has a number of consequences, such as:
> > * ...
> > * Existing #includes of standard library headers transparently turn into module imports in C++20
>
> It also in the wording explicitly adds the headers to the set of implementation-defined importable headers.
>
> > An importable header is a member of an implementation-defined set of headers that includes all importable C++ library headers (16.5.1.2 [headers])
>
> So I believe the author's intent was to require that include translation occurs.
>
> + Richard so we can ask them :)
>
> - Michael Spencer
standard library includes will always get translated.
(While I did raise concerns about the implications of this, I
wholeheartedly support P1502R0)
On Wed, Jul 10, 2019 at 3:15 PM Michael Spencer <bigcheesegs_at_[hidden]> wrote:
>
> On Wed, Jul 10, 2019 at 2:51 PM Gabriel Dos Reis via SG15 <sg15_at_[hidden]> wrote:
>>
>>
>>
>> | -----Original Message-----
>> | From: Bryce Adelstein Lelbach aka wash <brycelelbach_at_[hidden]>
>> | Sent: Wednesday, July 10, 2019 2:37 PM
>> | To: Gabriel Dos Reis <gdr_at_[hidden]>
>> | Cc: Tom Honermann <tom_at_[hidden]>; modules_at_[hidden];
>> | sg15_at_[hidden]
>> | Subject: Re: [isocpp-modules] [SG15] Determining identity like #pragma once
>> |
>> | On Wed, Jul 10, 2019 at 11:02 AM Gabriel Dos Reis <gdr_at_[hidden]>
>> | wrote:
>> | >
>> | > You are implying that the include translation is mandatory. Is that your
>> | argument?
>> |
>> | It is my belief that include translation is mandatory.
>> |
>> | "If the header identified by the header-name denotes an importable
>> | header ([module.import]), the preprocessing directive is instead
>> | replaced by the preprocessing-tokens: import header-name ;"
>> | https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Feel.is
>> | %2Fc%2B%2Bdraft%2Fcpp.include%237&data=02%7C01%7Cgdr%40mic
>> | rosoft.com%7C57adb75b608743ebf6e208d7057ed5d4%7C72f988bf86f141af
>> | 91ab2d7cd011db47%7C1%7C0%7C636983914618863287&sdata=JsvGf
>> | 0RfvcjOSMF6q%2FfsW60hhKx5TI%2F1K42M8PdRbOU%3D&reserved=0
>> |
>> | To me, that reads as "including an importable header must be
>> | translated to an import".
>> |
>> | Was that the original design intent?
>>
>> The original intent, as I understood it, was to *permit* include translation.
>>
>> A mandatory include translation is practically unworkable for the MSVC audience. I wouldn't be surprised at all if that is the case of other compilers too.
>>
>> A permission, as opposed to a requirement, would allow adoption of header import as better and principled replacement of PCH. Otherwise, it would create more problems than it solves.
>>
>> -- Gaby
>>
>
> I was there for most of the LEWG discussion on D1502R0 (Standard library header units for C++20), and I can not say with confidence that the room understood the implication that this would require include translation. There don't seem to be any minutes of the discussion on the wiki.
>
> However, the paper does explicitly point this out:
>
> > This has a number of consequences, such as:
> > * ...
> > * Existing #includes of standard library headers transparently turn into module imports in C++20
>
> It also in the wording explicitly adds the headers to the set of implementation-defined importable headers.
>
> > An importable header is a member of an implementation-defined set of headers that includes all importable C++ library headers (16.5.1.2 [headers])
>
> So I believe the author's intent was to require that include translation occurs.
>
> + Richard so we can ask them :)
>
> - Michael Spencer
-- Bryce Adelstein Lelbach aka wash CUDA Core C++ Libraries Lead @ NVIDIA ISO C++ Library Evolution Incubator Chair ISO C++ Tooling Chair CppCon and C++Now Program Chair CUDA Convert and Reformed AVX Junkie Sleep is for the weak --
Received on 2019-07-10 17:25:39