Subject: Ambiguity in the description of the elaborated-type-specifier.
From: Vladimir Grigoriev (vlad.moscow_at_[hidden])
Date: 2019-08-01 08:38:56
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
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
struct B *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 list run by email@example.com
Older Archives on Google Groups