Topic: Unclean places in Dec 96 draft
Author: Vlad Harchev <vladhar@imimail.ssau.ru>
Date: 1998/08/17 Raw View
================
7.3.3 [namespace.udecl], subpara 10:
In the enumeration of allowed combinations of declarations and
using-declarations, in the term 'entity' is used, but in the second
alternative it seems that this term should be specified cleaner: the
quote:
--exactly one declaration shall declare a class name or enumeration
name and the other declarations shall all refer to the same entity
or all refer to functions; in this case the class name or enumera-
tion name is hidden (_basic.scope.hiding_).
--end quote.
The cases should be listed more detailed since the entity can be typedef
name.
Here is a block that can be used instead of the given above:
--exactly one declaration shall declare a class name or enumeration
name
* ,an arbitrary set of typedef names that refer to name of this class
* name and enumeration name and the other declarations shall refer to
* the same entity provided this entity is not typedef
and the other declarations shall all refer to the same entity
or all refer to functions; in this case the class name or enumera-
tion name is hidden (_basic.scope.hiding_).
================
7.3.3 [namespace.udecl]
It's unclear from this section, whether the name can be declared with the
same name, as was used by using-declaration, so it doens't violate other
C++ rules. Example:
namespace A { int s; };
namespace B {
// consider nothing named 's' was here
using A::s; // inserted object declaration. Such declaration is valid -
// nothing named 's' was here
struct s {};//(1)
}
Is the line marked //(1) well-formed ? According to other C++ rules,
the name of the class will be hidded, but it's allowed.
================
13.4 [over.over] subpara 2
Description of taking the address of the overloaded function.
Stated (entire subpara):
If the name is a function template, template argument deduction is
done (_temp.deduct_), and if the argument deduction succeeds, the
deduced template arguments are used to generate a single template
function, which is added to the set of overloaded functions consid-
ered.
- It seems unclean - does the template function have to be generated? -
May be declaration only have to be generated ? Something clear should
be added to this para.
[ moderator's note: These comments refer to an outdated draft of
the standard. Please see the FAQ for information about more
recent versions. -sdc ]
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]