Date: Wed, 7 Dec 2022 17:08:43 +0000
On Wed, 7 Dec 2022 at 17:00, Vladimir Grigoriev via Std-Discussion <
std-discussion_at_[hidden]> wrote:
> Well, consider another phrase from the C++ Standard
>
> «2 In a function-definition, either void declarator ; or declarator ;
> shall be a well-formed function declaration ...»
>
> What is the «*void declarator*»? I have not found the definition of this
> term. It seems these word combination is encountered only once in the C++
> Standard.
>
That isn't a term; as you can see from the formatting, it's the token
sequence formed by placing adjacent the token <void>, the tokens making up
/declarator/, and the token <;> (semicolon). That token sequence, or
alternatively the token sequence formed from /declarator/ and <;> (without
<void>) is then lexed as by [dcl.fct] to check well-formedness.
With best regards
> (Vlad from Moscow)
>
>
> You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or
> http://ru.stackoverflow.com
>
>
>
> Среда, 7 декабря 2022, 14:53 +03:00 от Daniel Krügler <
> daniel.kruegler_at_[hidden]>:
>
> Am Mi., 7. Dez. 2022 um 12:21 Uhr schrieb Vladimir Grigoriev via
> Std-Discussion <std-discussion_at_[hidden]
> <http:///compose?To=std%2ddiscussion_at_[hidden]>>:
> >
> > The main problem of the C+ Standard is that some definitions can be
> interpreted in differenct ways.
>
> Is that really a specific problem of the C++ standard or just a
> problem of every natural language?
>
> > Consider for example the following quote from the C++ Standard
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, move constructor, copy assignment operator, or
> move assignment operator
> >
> > The phrase can be interpreted for example like
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, or one eligible move constructor, or one
> eligible copy assignment operator, or one eligible move assignment operator
> >
> > or like
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, and at least one eligible move constructor, and
> at least one eligible copy assignment operator, or move assignment operator
> >
> > As you can see the definition can be interpreted differently.
> >
> > How should the definition be interpreted?
>
> My understanding of the Oxford comma rules
> (https://en.wikipedia.org/wiki/Serial_comma) is that in such a list
> each item is combined with the "or"/"and" at the very last end to
> signal the combination operator between the individual items, which
> would correspond to your first interpretation.
>
> Thanks,
>
> - Daniel
>
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
std-discussion_at_[hidden]> wrote:
> Well, consider another phrase from the C++ Standard
>
> «2 In a function-definition, either void declarator ; or declarator ;
> shall be a well-formed function declaration ...»
>
> What is the «*void declarator*»? I have not found the definition of this
> term. It seems these word combination is encountered only once in the C++
> Standard.
>
That isn't a term; as you can see from the formatting, it's the token
sequence formed by placing adjacent the token <void>, the tokens making up
/declarator/, and the token <;> (semicolon). That token sequence, or
alternatively the token sequence formed from /declarator/ and <;> (without
<void>) is then lexed as by [dcl.fct] to check well-formedness.
With best regards
> (Vlad from Moscow)
>
>
> You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or
> http://ru.stackoverflow.com
>
>
>
> Среда, 7 декабря 2022, 14:53 +03:00 от Daniel Krügler <
> daniel.kruegler_at_[hidden]>:
>
> Am Mi., 7. Dez. 2022 um 12:21 Uhr schrieb Vladimir Grigoriev via
> Std-Discussion <std-discussion_at_[hidden]
> <http:///compose?To=std%2ddiscussion_at_[hidden]>>:
> >
> > The main problem of the C+ Standard is that some definitions can be
> interpreted in differenct ways.
>
> Is that really a specific problem of the C++ standard or just a
> problem of every natural language?
>
> > Consider for example the following quote from the C++ Standard
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, move constructor, copy assignment operator, or
> move assignment operator
> >
> > The phrase can be interpreted for example like
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, or one eligible move constructor, or one
> eligible copy assignment operator, or one eligible move assignment operator
> >
> > or like
> >
> > 1 A trivially copyable class is a class: (1.1) — that has at least one
> eligible copy constructor, and at least one eligible move constructor, and
> at least one eligible copy assignment operator, or move assignment operator
> >
> > As you can see the definition can be interpreted differently.
> >
> > How should the definition be interpreted?
>
> My understanding of the Oxford comma rules
> (https://en.wikipedia.org/wiki/Serial_comma) is that in such a list
> each item is combined with the "or"/"and" at the very last end to
> signal the combination operator between the individual items, which
> would correspond to your first interpretation.
>
> Thanks,
>
> - Daniel
>
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
Received on 2022-12-07 17:08:57