tmp/tmpnj3n5ffx/{from.md → to.md}
RENAMED
|
@@ -20,30 +20,28 @@ translation unit if:
|
|
| 20 |
- D does not declare a function or function template and S contains an
|
| 21 |
*id-expression*, *namespace-name*, *type-name*, *template-name*, or
|
| 22 |
*concept-name* naming D, or
|
| 23 |
- D declares a function or function template that is named by an
|
| 24 |
expression [[basic.def.odr]] appearing in S, or
|
| 25 |
-
- S contains
|
| 26 |
-
``
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
function [[over.over]] whose set of overloads contains D and for which
|
| 38 |
-
the target type is dependent, or
|
| 39 |
- there exists a declaration M that is not a *namespace-definition* for
|
| 40 |
which M is decl-reachable from S and either
|
| 41 |
- D is decl-reachable from M, or
|
| 42 |
- D redeclares the entity declared by M or M redeclares the entity
|
| 43 |
-
declared by D, and D
|
| 44 |
-
block
|
| 45 |
- D declares a namespace N and M is a member of N, or
|
| 46 |
- one of M and D declares a class or class template C and the other
|
| 47 |
declares a member or friend of C, or
|
| 48 |
- one of D and M declares an enumeration E and the other declares an
|
| 49 |
enumerator of E, or
|
|
@@ -55,11 +53,11 @@ translation unit if:
|
|
| 55 |
introduces a typedef name for linkage purposes for that type.
|
| 56 |
|
| 57 |
In this determination, it is unspecified
|
| 58 |
|
| 59 |
- whether a reference to an *alias-declaration*, `typedef` declaration,
|
| 60 |
-
*using-declaration*, or *namespace-alias-
|
| 61 |
the declarations they name prior to this determination,
|
| 62 |
- whether a *simple-template-id* that does not denote a dependent type
|
| 63 |
and whose *template-name* names an alias template is replaced by its
|
| 64 |
denoted type prior to this determination,
|
| 65 |
- whether a *decltype-specifier* that does not denote a dependent type
|
|
@@ -69,11 +67,11 @@ In this determination, it is unspecified
|
|
| 69 |
|
| 70 |
A declaration `D` in a global module fragment of a module unit is
|
| 71 |
*discarded* if `D` is not decl-reachable from any *declaration* in the
|
| 72 |
*declaration-seq* of the *translation-unit*.
|
| 73 |
|
| 74 |
-
[*Note
|
| 75 |
name lookup outside the module unit, nor in template instantiations
|
| 76 |
whose points of instantiation [[temp.point]] are outside the module
|
| 77 |
unit, even when the instantiation context [[module.context]] includes
|
| 78 |
the module unit. — *end note*]
|
| 79 |
|
|
|
|
| 20 |
- D does not declare a function or function template and S contains an
|
| 21 |
*id-expression*, *namespace-name*, *type-name*, *template-name*, or
|
| 22 |
*concept-name* naming D, or
|
| 23 |
- D declares a function or function template that is named by an
|
| 24 |
expression [[basic.def.odr]] appearing in S, or
|
| 25 |
+
- S contains a dependent call `E` [[temp.dep]] and D is found by any
|
| 26 |
+
name lookup performed for an expression synthesized from `E` by
|
| 27 |
+
replacing each type-dependent argument or operand with a value of a
|
| 28 |
+
placeholder type with no associated namespaces or entities, or
|
| 29 |
+
\[*Note 2*: This includes the lookup for `operator==` performed when
|
| 30 |
+
considering rewriting an `!=` expression, the lookup for `operator<=>`
|
| 31 |
+
performed when considering rewriting a relational comparison, and the
|
| 32 |
+
lookup for `operator!=` when considering whether an `operator==` is a
|
| 33 |
+
rewrite target. — *end note*]
|
| 34 |
+
- S contains an expression that takes the address of an overload set
|
| 35 |
+
[[over.over]] that contains D and for which the target type is
|
| 36 |
+
dependent, or
|
|
|
|
|
|
|
| 37 |
- there exists a declaration M that is not a *namespace-definition* for
|
| 38 |
which M is decl-reachable from S and either
|
| 39 |
- D is decl-reachable from M, or
|
| 40 |
- D redeclares the entity declared by M or M redeclares the entity
|
| 41 |
+
declared by D, and D neither is a friend declaration nor inhabits a
|
| 42 |
+
block scope, or
|
| 43 |
- D declares a namespace N and M is a member of N, or
|
| 44 |
- one of M and D declares a class or class template C and the other
|
| 45 |
declares a member or friend of C, or
|
| 46 |
- one of D and M declares an enumeration E and the other declares an
|
| 47 |
enumerator of E, or
|
|
|
|
| 53 |
introduces a typedef name for linkage purposes for that type.
|
| 54 |
|
| 55 |
In this determination, it is unspecified
|
| 56 |
|
| 57 |
- whether a reference to an *alias-declaration*, `typedef` declaration,
|
| 58 |
+
*using-declaration*, or *namespace-alias-definition* is replaced by
|
| 59 |
the declarations they name prior to this determination,
|
| 60 |
- whether a *simple-template-id* that does not denote a dependent type
|
| 61 |
and whose *template-name* names an alias template is replaced by its
|
| 62 |
denoted type prior to this determination,
|
| 63 |
- whether a *decltype-specifier* that does not denote a dependent type
|
|
|
|
| 67 |
|
| 68 |
A declaration `D` in a global module fragment of a module unit is
|
| 69 |
*discarded* if `D` is not decl-reachable from any *declaration* in the
|
| 70 |
*declaration-seq* of the *translation-unit*.
|
| 71 |
|
| 72 |
+
[*Note 3*: A discarded declaration is neither reachable nor visible to
|
| 73 |
name lookup outside the module unit, nor in template instantiations
|
| 74 |
whose points of instantiation [[temp.point]] are outside the module
|
| 75 |
unit, even when the instantiation context [[module.context]] includes
|
| 76 |
the module unit. — *end note*]
|
| 77 |
|