Date: Thu, 1 Aug 2019 11:35:42 -0500
On Thu, Aug 1, 2019 at 8:39 AM Vladimir Grigoriev via Std-Discussion <
std-discussion_at_[hidden]> wrote:
> Let's consider the p.#7 of the section 6.3.2 Point of declaration )C++20)
>
> There is written
>
> (7.2) — for an elaborated-type-specifier of the form
>
> class-key identifier
>
> if the elaborated-type-specifier is used in the decl-specifier-seq or
> parameter-declaration-clause of a function defined in namespace scope, the
> identifier is declared as a class-name in the namespace that contains the
> declaration; otherwise, except as a friend declaration, the identifier is
> declared in the smallest namespace or block scope that contains the
> declaration.
>
> So this can be read as the form of the elaborated-type-specifier is
> considered only as a function parameter.
>
> This makes unclear where for example the point of the declaration of the
> structure B in the following example
>
It sounds like you're saying that the standard only says what scope B is
declared in, not where the point of declaration is? I agree, the wording
seems to be incomplete. Maybe you can open up a defect report?
>
> struct A
> {
> struct B *b;
> };
>
> struct B
> {
> };
> That is the quote from the Standard does not cover this case or at least
> makes it unclear.
>
> I think that the paragraph should be rewritten to make it more clear.
>
> With best regards,
> Vlad from Moscow
> You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or
> http://ru.stackoverflow.com
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> http://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
std-discussion_at_[hidden]> wrote:
> Let's consider the p.#7 of the section 6.3.2 Point of declaration )C++20)
>
> There is written
>
> (7.2) — for an elaborated-type-specifier of the form
>
> class-key identifier
>
> if the elaborated-type-specifier is used in the decl-specifier-seq or
> parameter-declaration-clause of a function defined in namespace scope, the
> identifier is declared as a class-name in the namespace that contains the
> declaration; otherwise, except as a friend declaration, the identifier is
> declared in the smallest namespace or block scope that contains the
> declaration.
>
> So this can be read as the form of the elaborated-type-specifier is
> considered only as a function parameter.
>
> This makes unclear where for example the point of the declaration of the
> structure B in the following example
>
It sounds like you're saying that the standard only says what scope B is
declared in, not where the point of declaration is? I agree, the wording
seems to be incomplete. Maybe you can open up a defect report?
>
> struct A
> {
> struct B *b;
> };
>
> struct B
> {
> };
> That is the quote from the Standard does not cover this case or at least
> makes it unclear.
>
> I think that the paragraph should be rewritten to make it more clear.
>
> With best regards,
> Vlad from Moscow
> You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or
> http://ru.stackoverflow.com
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> http://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
-- *Brian Bi*
Received on 2019-08-01 11:37:55