C++ Logo

sg15

Advanced search

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

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 10 Jul 2019 19:23:03 +0000
Longer answer later, quick ack: please carefully read the spec about import declaration. It allows for both source file and headers. It also seems to restricting only to headers.

This is not addressed to Corentin in particular, but more to Tom, Ville, and everybody else involved.

— Gaby, writing from a non-computer


On Jul 10, 2019, at 12:18 PM, Corentin <corentin.jabot_at_[hidden]<mailto:corentin.jabot_at_[hidden]>> wrote:



On Wed, 10 Jul 2019 at 21:11, Ville Voutilainen <ville.voutilainen_at_[hidden]<mailto:ville.voutilainen_at_[hidden]>> wrote:
On Wed, 10 Jul 2019 at 22:09, Ville Voutilainen
<ville.voutilainen_at_[hidden]<mailto:ville.voutilainen_at_[hidden]>> wrote:
>
> On Wed, 10 Jul 2019 at 22:06, Tom Honermann <tom_at_[hidden]<mailto:tom_at_[hidden]>> wrote:
>
> > You are implying that the include translation is mandatory. Is that your argument?
> >
> > Yes. The wording in [cpp.include]p7 seems fairly clear regarding that.
>
> Not at all. "If the header identified by the header-name denotes an
> importable header" is implementation-defined. The set
> of importable headers is allowed to be whatever the implementation
> decides, including an empty set. The library specification
> might change that for some library headers, but in general, it doesn't
> seem to me that include translation is mandatory
> for #include. If you import a header, it must be importable, but
> #including it doesn't require that, based on what the spec says.

..however, having said all that, it doesn't seem to me that you can
get to the problematic situation with a well-formed program,
either, because if the header isn't importable, importing it violates
a shall-requirement and is thus ill-formed, in Core-speak.
And if you can import it, #including it will also import it. Pardon
the possible confusion caused by the earlier.


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?

_______________________________________________
Modules mailing list
Modules_at_[hidden]<mailto:Modules_at_[hidden]>
Subscription: http://lists.isocpp.org/mailman/listinfo.cgi/modules<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fmodules&data=02%7C01%7Cgdr%40microsoft.com%7Cbb10706916e2451e07ea08d7056b6fcf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983831303181607&sdata=skdXbPlChWQsxNuibWfysFiLWTq8azbB8kDrHyJOT78%3D&reserved=0>
Link to this post: http://lists.isocpp.org/modules/2019/07/0490.php<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmodules%2F2019%2F07%2F0490.php&data=02%7C01%7Cgdr%40microsoft.com%7Cbb10706916e2451e07ea08d7056b6fcf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983831303191617&sdata=Yqj8XvVjh0eekKsDVMSrAVbLdIweD0vqXXAswAWra4A%3D&reserved=0>
_______________________________________________
Modules mailing list
Modules_at_[hidden]<mailto:Modules_at_lists.isocpp.org>
Subscription: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fmodules&amp;data=02%7C01%7Cgdr%40microsoft.com%7Cbb10706916e2451e07ea08d7056b6fcf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983831303211631&amp;sdata=jXHzrk2As7Z4xqkpHw%2B6iJ6ENYYLdq0aNAO%2Fmgex9uU%3D&amp;reserved=0
Link to this post: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmodules%2F2019%2F07%2F0493.php&amp;data=02%7C01%7Cgdr%40microsoft.com%7Cbb10706916e2451e07ea08d7056b6fcf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983831303211631&amp;sdata=YYyhlTA5y%2F1QsM12fVFn%2BveVRh6J6znlZO8PjEvY8Fk%3D&amp;reserved=0

Received on 2019-07-10 14:24:58