Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #81257 > unrolled thread
| Started by | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| First post | 2021-09-13 17:33 -0500 |
| Last post | 2021-09-14 09:55 -0700 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.lang.c++
"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
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Date | 2021-09-13 17:33 -0500 |
| Subject | "C++20 Modules — Complete Guide" by Šimon Tóth |
| Message-ID | <shojj3$niq$2@dont-email.me> |
"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."
Lynn
[toc] | [next] | [standalone]
| From | Tim Woodall <news001@woodall.me.uk> |
|---|---|
| Date | 2021-09-14 07:49 +0000 |
| Subject | Re: "C++20 Modules ??? Complete Guide" by ??imon T??th |
| Message-ID | <shpk6q$hu3$1@einstein.home.woodall.me.uk> |
| In reply to | #81257 |
On 2021-09-13, Lynn McGuire <lynnmcguire5@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! This statement: Unexported symbols have private visibility, which is the opposite of normal C++ behaviour, where only symbols within anonymous namespaces are unexported. Has the export of symbols in anonymous namespaces changed? One upon a time symbols in the anonymous namespaces were exported, but with a mangled name that couldn't be deduced elsewhere. I like the "cleanness" of anonymous namespaces over static. But I've seen places where the sheer volume of exported but unused by the linker symbols causes problems, especially for tools that, for example, attempt to check for circular dependencies being introduced.
[toc] | [prev] | [next] | [standalone]
| From | Anand Hariharan <mailto.anand.hariharan@gmail.com> |
|---|---|
| Date | 2021-09-14 07:22 -0700 |
| Subject | Re: "C++20 Modules ??? Complete Guide" by ??imon T??th |
| Message-ID | <117fe0fd-ffcf-4953-921c-4f3b245aa112n@googlegroups.com> |
| In reply to | #81261 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2021-09-14 09:55 -0700 |
| Subject | Re: "C++20 Modules ??? Complete Guide" by ??imon T??th |
| Message-ID | <8735q7drlj.fsf@nosuchdomain.example.com> |
| In reply to | #81263 |
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 */
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c++
csiph-web