Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #81266
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: "C++20 Modules ??? Complete Guide" by ??imon T??th |
| Date | 2021-09-14 09:55 -0700 |
| Organization | None to speak of |
| Message-ID | <8735q7drlj.fsf@nosuchdomain.example.com> (permalink) |
| References | <shojj3$niq$2@dont-email.me> <shpk6q$hu3$1@einstein.home.woodall.me.uk> <117fe0fd-ffcf-4953-921c-4f3b245aa112n@googlegroups.com> |
Anand Hariharan <mailto.anand.hariharan@gmail.com> writes:
> On Tuesday, September 14, 2021 at 2:50:20 AM UTC-5, Tim Woodall wrote:
>> On 2021-09-13, Lynn McGuire <lynnmc...@gmail.com> wrote:
>> > "C++20 Modules ??? Complete Guide" by ??imon T??th
>> > https://itnext.io/c-20-modules-complete-guide-ae741ddbae3d
>> >
>> > "Compilers and build systems are slowly starting to support C++20
>> > modules. Perfect time for you to read this guide and benefit from the
>> > massive compilation speedups. This article reflects the state as of
>> > September 2021."
>> >
>> Thanks for the link.
>>
>> I have a couple of quick questions.
>>
>> In the "module" example we have
>> #include <iostream>;
>>
>> Is the semicolon required here? Subtle, hard to spot change if it is!
>>
>
> The code in the page was
>
> import <iostream>;
>
> Code uses 'import' not 'include'; also the '#' is omitted. In other words, no preprocessor at play.
And to answer the question, yes, the semicolon is required.
From the N4885 draft:
module-declaration :
export-keyword[opt] module-keyword module-name module-partition[opt] attribute-specifier-seq[opt] ;
module-name :
module-name-qualifier[opt] identifier
module-partition :
: module-name-qualifier[opt] identifier
module-name-qualifier :
identifier .
module-name-qualifier identifier .
("module-keyword" is "module". The "module", "import", and "export"
keywords are treated specially.)
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
"C++20 Modules — Complete Guide" by Šimon Tóth Lynn McGuire <lynnmcguire5@gmail.com> - 2021-09-13 17:33 -0500
Re: "C++20 Modules ??? Complete Guide" by ??imon T??th Tim Woodall <news001@woodall.me.uk> - 2021-09-14 07:49 +0000
Re: "C++20 Modules ??? Complete Guide" by ??imon T??th Anand Hariharan <mailto.anand.hariharan@gmail.com> - 2021-09-14 07:22 -0700
Re: "C++20 Modules ??? Complete Guide" by ??imon T??th Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-14 09:55 -0700
csiph-web