tmp/tmpidl9nh7b/{from.md → to.md}
RENAMED
|
@@ -13,11 +13,11 @@ A *global-module-fragment* specifies the contents of the *global module
|
|
| 13 |
fragment* for a module unit. The global module fragment can be used to
|
| 14 |
provide declarations that are attached to the global module and usable
|
| 15 |
within the module unit.
|
| 16 |
|
| 17 |
A declaration D is *decl-reachable* from a declaration S in the same
|
| 18 |
-
translation unit if
|
| 19 |
|
| 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
|
|
@@ -35,23 +35,24 @@ translation unit if:
|
|
| 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
|
| 41 |
-
|
| 42 |
-
block scope, or
|
| 43 |
- D declares a namespace N and M is a member of N, or
|
| 44 |
-
- one of
|
| 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
|
| 48 |
- D declares a function or variable and M is declared in D,[^2] or
|
| 49 |
-
- one of
|
| 50 |
or explicit specialization or an implicit or explicit instantiation
|
| 51 |
of that template, or
|
| 52 |
-
-
|
|
|
|
|
|
|
| 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,
|
|
@@ -59,13 +60,18 @@ In this determination, it is unspecified
|
|
| 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
|
| 64 |
-
is replaced by its denoted type prior to this determination,
|
| 65 |
- whether a non-value-dependent constant expression is replaced by the
|
| 66 |
-
result of constant evaluation prior to this determination
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|
|
|
|
| 13 |
fragment* for a module unit. The global module fragment can be used to
|
| 14 |
provide declarations that are attached to the global module and usable
|
| 15 |
within the module unit.
|
| 16 |
|
| 17 |
A declaration D is *decl-reachable* from a declaration S in the same
|
| 18 |
+
translation unit if
|
| 19 |
|
| 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
|
|
|
|
| 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 and M declare the same entity, and D neither is a friend
|
| 41 |
+
declaration nor inhabits a block scope, or
|
|
|
|
| 42 |
- D declares a namespace N and M is a member of N, or
|
| 43 |
+
- one of D and M declares a class or class template C and the other
|
| 44 |
declares a member or friend of C, or
|
| 45 |
- one of D and M declares an enumeration E and the other declares an
|
| 46 |
enumerator of E, or
|
| 47 |
- D declares a function or variable and M is declared in D,[^2] or
|
| 48 |
+
- one of D and M declares a template and the other declares a partial
|
| 49 |
or explicit specialization or an implicit or explicit instantiation
|
| 50 |
of that template, or
|
| 51 |
+
- M declares a class template and D is a deduction guide for that
|
| 52 |
+
template, or
|
| 53 |
+
- one of D and M declares a class or enumeration type and the other
|
| 54 |
introduces a typedef name for linkage purposes for that type.
|
| 55 |
|
| 56 |
In this determination, it is unspecified
|
| 57 |
|
| 58 |
- whether a reference to an *alias-declaration*, `typedef` declaration,
|
|
|
|
| 60 |
the declarations they name prior to this determination,
|
| 61 |
- whether a *simple-template-id* that does not denote a dependent type
|
| 62 |
and whose *template-name* names an alias template is replaced by its
|
| 63 |
denoted type prior to this determination,
|
| 64 |
- whether a *decltype-specifier* that does not denote a dependent type
|
| 65 |
+
is replaced by its denoted type prior to this determination,
|
| 66 |
- whether a non-value-dependent constant expression is replaced by the
|
| 67 |
+
result of constant evaluation prior to this determination, and
|
| 68 |
+
- whether a *splice-expression*, a *splice-type-specifier*, a
|
| 69 |
+
*splice-scope-specifier*, or any *splice-specifier* or
|
| 70 |
+
*splice-specialization-specifier* outside of the preceding is replaced
|
| 71 |
+
in any non-dependent context by the construct that it designates prior
|
| 72 |
+
to this determination.
|
| 73 |
|
| 74 |
A declaration `D` in a global module fragment of a module unit is
|
| 75 |
*discarded* if `D` is not decl-reachable from any *declaration* in the
|
| 76 |
*declaration-seq* of the *translation-unit*.
|
| 77 |
|