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 22:04:37 +0000
Well, there is actually an issue here. I don't know if it is wording omission or more fundamental.

An import of a header cam name both a source file and a header. The metavariable H in that spec is not restricted to headers. However, later in that same spec, it says that H must be a member of an implementation-defined set of headers. Note that it no longer talks about source files. If the later requirement is meant to imply that H can only be a header, then what about source files? Are they free of any additional requirements? If so, then change the angle brackets to quotes in my examples. If not, then I still think we may have usability problems.

-- Gaby

| -----Original Message-----
| From: Bryce Adelstein Lelbach aka wash <brycelelbach_at_gmail.com>
| Sent: Wednesday, July 10, 2019 2:37 PM
| To: Gabriel Dos Reis <gdr_at_microsoft.com>
| Cc: Tom Honermann <tom_at_[hidden]>; modules_at_lists.isocpp.org;
| 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_microsoft.com>
| 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&amp;data=02%7C01%7Cgdr%40mic
| rosoft.com%7C57adb75b608743ebf6e208d7057ed5d4%7C72f988bf86f141af
| 91ab2d7cd011db47%7C1%7C0%7C636983914618863287&amp;sdata=JsvGf
| 0RfvcjOSMF6q%2FfsW60hhKx5TI%2F1K42M8PdRbOU%3D&amp;reserved=0
|
| To me, that reads as "including an importable header must be
| translated to an import".
|
| Was that the original design intent?
|
| --
| 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:06:33