The sets of namespaces and entities
are determined entirely by
the types of the function arguments
(and the namespace of any template template argument)
. Typedef names and
using-declarations
used to specify the types
do not contribute to this set
. The sets of namespaces and entities
are determined in the following way:
If
T is a fundamental type, its associated sets of
namespaces and entities are both empty
.If
T is a class type (including unions),
its associated entities are:
the class itself;
the class of which it is a member, if any;
and its direct and indirect base classes
. Its associated namespaces are
the innermost enclosing namespaces of its associated entities
. Furthermore, if
T is a class template specialization,
its associated namespaces and entities also include:
the namespaces and entities
associated with the types of the template arguments
provided for template type parameters
(excluding template template parameters);
the templates used as template template arguments;
the namespaces of which any template template arguments are members; and the
classes of which any member templates used as template template
arguments are members
. [
Note 1:
Non-type template arguments do not
contribute to the set of associated namespaces
. —
end note]
If
T is an enumeration type,
its associated namespace is
the innermost enclosing namespace of its declaration, and
its associated entities are
T
and, if it is a class member, the member's class
.If
T is a pointer to
U or an array of
U,
its associated namespaces and entities are those associated with
U.If
T is a function type, its associated namespaces and
entities are those associated with the function parameter types and those
associated with the return type
.If
T is a pointer to a member function of a class
X, its associated namespaces and entities are those associated
with the function parameter types and return type, together with those
associated with
X.If
T is a pointer to a data member of class
X, its
associated namespaces and entities are those associated with the member
type together with those associated with
X.
If an associated namespace is an
inline namespace, its
enclosing namespace is also included in the set
. If an associated namespace
directly contains inline namespaces, those inline namespaces are also included
in the set
. In addition, if the argument is the name or address of an overload set,
its associated entities
and namespaces are the union of those associated with each of the
members of the set, i.e., the entities and namespaces associated with its
parameter types and return type
.