From Jason Turner

[module.context]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpgflbt8t7/{from.md → to.md} +23 -9
tmp/tmpgflbt8t7/{from.md → to.md} RENAMED
@@ -4,35 +4,49 @@ The *instantiation context* is a set of points within the program that
4
  determines which declarations are found by argument-dependent name
5
  lookup [[basic.lookup.argdep]] and which are reachable [[module.reach]]
6
  in the context of a particular declaration or template instantiation.
7
 
8
  During the implicit definition of a defaulted function
9
- [[special]], [[class.compare.default]], the instantiation context is the
10
- union of the instantiation context from the definition of the class and
11
- the instantiation context of the program construct that resulted in the
12
- implicit definition of the defaulted function.
 
13
 
14
  During the implicit instantiation of a template whose point of
15
  instantiation is specified as that of an enclosing specialization
16
- [[temp.point]], the instantiation context is the union of the
17
  instantiation context of the enclosing specialization and, if the
18
  template is defined in a module interface unit of a module M and the
19
  point of instantiation is not in a module interface unit of M, the point
20
  at the end of the *declaration-seq* of the primary module interface unit
21
  of M (prior to the *private-module-fragment*, if any).
22
 
23
  During the implicit instantiation of a template that is implicitly
24
  instantiated because it is referenced from within the implicit
25
- definition of a defaulted function, the instantiation context is the
26
- instantiation context of the defaulted function.
27
 
28
  During the instantiation of any other template specialization, the
29
- instantiation context comprises the point of instantiation of the
30
  template.
31
 
 
 
 
 
 
 
 
 
 
 
 
32
  In any other case, the instantiation context at a point within the
33
- program comprises that point.
 
 
34
 
35
  [*Example 1*:
36
 
37
  Translation unit #1
38
 
 
4
  determines which declarations are found by argument-dependent name
5
  lookup [[basic.lookup.argdep]] and which are reachable [[module.reach]]
6
  in the context of a particular declaration or template instantiation.
7
 
8
  During the implicit definition of a defaulted function
9
+ [[special]], [[class.compare.default]], the instantiation context
10
+ contains each point in the instantiation context from the definition of
11
+ the class and each point in the instantiation context of the program
12
+ construct that resulted in the implicit definition of the defaulted
13
+ function.
14
 
15
  During the implicit instantiation of a template whose point of
16
  instantiation is specified as that of an enclosing specialization
17
+ [[temp.point]], the instantiation context contains each point in the
18
  instantiation context of the enclosing specialization and, if the
19
  template is defined in a module interface unit of a module M and the
20
  point of instantiation is not in a module interface unit of M, the point
21
  at the end of the *declaration-seq* of the primary module interface unit
22
  of M (prior to the *private-module-fragment*, if any).
23
 
24
  During the implicit instantiation of a template that is implicitly
25
  instantiated because it is referenced from within the implicit
26
+ definition of a defaulted function, the instantiation context contains
27
+ each point in the instantiation context of the defaulted function.
28
 
29
  During the instantiation of any other template specialization, the
30
+ instantiation context contains the point of instantiation of the
31
  template.
32
 
33
+ During the implicit instantiation of any construct that resulted from
34
+ the evaluation of an expression as a core constant expression, the
35
+ instantiation context contains each point in the evaluation context
36
+ [[expr.const]].
37
+
38
+ [*Note 1*: Implicit instantiations can result from invocations of
39
+ library functions [[meta.reflection]]. The evaluation context can
40
+ include synthesized points associated with injected declarations
41
+ produced by `std::meta::define_aggregate`
42
+ [[meta.reflection.define.aggregate]]. — *end note*]
43
+
44
  In any other case, the instantiation context at a point within the
45
+ program contains that point.
46
+
47
+ The instantiation context contains only the points specified above.
48
 
49
  [*Example 1*:
50
 
51
  Translation unit #1
52