tmp/tmpfie2ch5l/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
### Argument-dependent name lookup <a id="basic.lookup.argdep">[[basic.lookup.argdep]]</a>
|
| 2 |
|
| 3 |
When the *postfix-expression* in a function call ([[expr.call]]) is an
|
| 4 |
*unqualified-id*, other namespaces not considered during the usual
|
| 5 |
unqualified lookup ([[basic.lookup.unqual]]) may be searched, and in
|
| 6 |
-
those namespaces, namespace-scope friend function
|
| 7 |
-
[[class.friend]]) not otherwise visible may be found.
|
| 8 |
-
modifications to the search depend on the types of the arguments
|
| 9 |
-
for template template arguments, the namespace of the template
|
| 10 |
argument).
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
namespace N {
|
| 14 |
struct S { };
|
|
@@ -35,23 +35,23 @@ way:
|
|
| 35 |
- If `T` is a fundamental type, its associated sets of namespaces and
|
| 36 |
classes are both empty.
|
| 37 |
- If `T` is a class type (including unions), its associated classes are:
|
| 38 |
the class itself; the class of which it is a member, if any; and its
|
| 39 |
direct and indirect base classes. Its associated namespaces are the
|
| 40 |
-
namespaces of
|
| 41 |
if `T` is a class template specialization, its associated namespaces
|
| 42 |
and classes also include: the namespaces and classes associated with
|
| 43 |
the types of the template arguments provided for template type
|
| 44 |
parameters (excluding template template parameters); the namespaces of
|
| 45 |
which any template template arguments are members; and the classes of
|
| 46 |
which any member templates used as template template arguments are
|
| 47 |
members. Non-type template arguments do not contribute to the set of
|
| 48 |
associated namespaces.
|
| 49 |
- If `T` is an enumeration type, its associated namespace is the
|
| 50 |
-
|
| 51 |
-
associated class is the member’s class; else it has no
|
| 52 |
-
class.
|
| 53 |
- If `T` is a pointer to `U` or an array of `U`, its associated
|
| 54 |
namespaces and classes are those associated with `U`.
|
| 55 |
- If `T` is a function type, its associated namespaces and classes are
|
| 56 |
those associated with the function parameter types and those
|
| 57 |
associated with the return type.
|
|
|
|
| 1 |
### Argument-dependent name lookup <a id="basic.lookup.argdep">[[basic.lookup.argdep]]</a>
|
| 2 |
|
| 3 |
When the *postfix-expression* in a function call ([[expr.call]]) is an
|
| 4 |
*unqualified-id*, other namespaces not considered during the usual
|
| 5 |
unqualified lookup ([[basic.lookup.unqual]]) may be searched, and in
|
| 6 |
+
those namespaces, namespace-scope friend function or function template
|
| 7 |
+
declarations ([[class.friend]]) not otherwise visible may be found.
|
| 8 |
+
These modifications to the search depend on the types of the arguments
|
| 9 |
+
(and for template template arguments, the namespace of the template
|
| 10 |
argument).
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
namespace N {
|
| 14 |
struct S { };
|
|
|
|
| 35 |
- If `T` is a fundamental type, its associated sets of namespaces and
|
| 36 |
classes are both empty.
|
| 37 |
- If `T` is a class type (including unions), its associated classes are:
|
| 38 |
the class itself; the class of which it is a member, if any; and its
|
| 39 |
direct and indirect base classes. Its associated namespaces are the
|
| 40 |
+
innermost enclosing namespaces of its associated classes. Furthermore,
|
| 41 |
if `T` is a class template specialization, its associated namespaces
|
| 42 |
and classes also include: the namespaces and classes associated with
|
| 43 |
the types of the template arguments provided for template type
|
| 44 |
parameters (excluding template template parameters); the namespaces of
|
| 45 |
which any template template arguments are members; and the classes of
|
| 46 |
which any member templates used as template template arguments are
|
| 47 |
members. Non-type template arguments do not contribute to the set of
|
| 48 |
associated namespaces.
|
| 49 |
- If `T` is an enumeration type, its associated namespace is the
|
| 50 |
+
innermost enclosing namespace of its declaration. If it is a class
|
| 51 |
+
member, its associated class is the member’s class; else it has no
|
| 52 |
+
associated class.
|
| 53 |
- If `T` is a pointer to `U` or an array of `U`, its associated
|
| 54 |
namespaces and classes are those associated with `U`.
|
| 55 |
- If `T` is a function type, its associated namespaces and classes are
|
| 56 |
those associated with the function parameter types and those
|
| 57 |
associated with the return type.
|