Topic: Qualified-id and qualified names?
Author: "Johannes Schaub (litb)" <schaub-johannes@web.de>
Date: Sun, 3 Jan 2010 12:08:20 CST Raw View
Hello all - i found there are many places where the Standard refers to
qualified-id, but actually in that context no qualified-id appears or the
obvious intend was to apply to all qualified names. Examples:
3.4.3.1/1: "If the nested-name-specifier of a qualified-id nominates a
class, the name specified after the nested-name-specifier is looked up in
the scope of the class (10.2), except for the cases listed below: [...] the
lookup for a name specified in a using-declaration (7.3.3) also finds class
or enumeration names" - no qualified-id appears in a using declaration.
3.4.3.2/1: If the nested-name-specifier of a qualified-id nominates a
namespace, the name specified after the nested-name-specifier is looked up
in the scope of the namespace ..." - what about declaration "A::f<int>
foo;", where the type-specifier does not use qualified-id?
14.7/6: "If the qualified-id in a typename-specifier does not denote a type,
the program is ill-formed." - no qualified-id here either!
14.7.2.1/4: "A name is a member of the current instantiation if it is ...
A qualified-id in which the nested-name-specifier refers to the current
instantiation." - what about type-specifiers like "T::x y;" ?
I've noticed DR 120 ( http://www.open-
std.org/jtc1/sc22/wg21/docs/cwg_defects.html#120 ) replaced "qualified-name"
by "qualified-id" in some places - could it be that the original intent of
"qualified-name" was to apply to all names that happen to use nested-name-
specifiers?
Thanks!
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]