From Jason Turner

[temp.dep.res]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp2odoh489/{from.md → to.md} +21 -13
tmp/tmp2odoh489/{from.md → to.md} RENAMED
@@ -26,10 +26,21 @@ If a function template or member function of a class template is called
26
  in a way which uses the definition of a default argument of that
27
  function template or member function, the point of instantiation of the
28
  default argument is the point of instantiation of the function template
29
  or member function specialization.
30
 
 
 
 
 
 
 
 
 
 
 
 
31
  For a class template specialization, a class member template
32
  specialization, or a specialization for a class member of a class
33
  template, if the specialization is implicitly instantiated because it is
34
  referenced from within another template specialization, if the context
35
  from which the specialization is referenced depends on a template
@@ -66,27 +77,24 @@ units. If two different points of instantiation give a template
66
  specialization different meanings according to the one definition rule (
67
  [[basic.def.odr]]), the program is ill-formed, no diagnostic required.
68
 
69
  #### Candidate functions <a id="temp.dep.candidate">[[temp.dep.candidate]]</a>
70
 
71
- For a function call that depends on a template parameter, the candidate
72
- functions are found using the usual lookup rules (
73
- [[basic.lookup.unqual]], [[basic.lookup.argdep]],  
74
- [[basic.lookup.qual]]) except that:
75
 
76
  - For the part of the lookup using unqualified name lookup (
77
- [[basic.lookup.unqual]]) or qualified name lookup (
78
- [[basic.lookup.qual]]), only function declarations from the template
79
  definition context are found.
80
  - For the part of the lookup using associated namespaces (
81
  [[basic.lookup.argdep]]), only function declarations found in either
82
  the template definition context or the template instantiation context
83
  are found.
84
 
85
- If the function name is an *unqualified-id* and the call would be
86
- ill-formed or would find a better match had the lookup within the
87
- associated namespaces considered all the function declarations with
88
- external linkage introduced in those namespaces in all translation
89
- units, not just considering those declarations found in the template
90
- definition and template instantiation contexts, then the program has
91
- undefined behavior.
92
 
 
26
  in a way which uses the definition of a default argument of that
27
  function template or member function, the point of instantiation of the
28
  default argument is the point of instantiation of the function template
29
  or member function specialization.
30
 
31
+ For an *exception-specification* of a function template specialization
32
+ or specialization of a member function of a class template, if the
33
+ *exception-specification* is implicitly instantiated because it is
34
+ needed by another template specialization and the context that requires
35
+ it depends on a template parameter, the point of instantiation of the
36
+ *exception-specification* is the point of instantiation of the
37
+ specialization that requires it. Otherwise, the point of instantiation
38
+ for such an *exception-specification* immediately follows the namespace
39
+ scope declaration or definition that requires the
40
+ *exception-specification*.
41
+
42
  For a class template specialization, a class member template
43
  specialization, or a specialization for a class member of a class
44
  template, if the specialization is implicitly instantiated because it is
45
  referenced from within another template specialization, if the context
46
  from which the specialization is referenced depends on a template
 
77
  specialization different meanings according to the one definition rule (
78
  [[basic.def.odr]]), the program is ill-formed, no diagnostic required.
79
 
80
  #### Candidate functions <a id="temp.dep.candidate">[[temp.dep.candidate]]</a>
81
 
82
+ For a function call where the *postfix-expression* is a dependent name,
83
+ the candidate functions are found using the usual lookup rules (
84
+ [[basic.lookup.unqual]], [[basic.lookup.argdep]]) except that:
 
85
 
86
  - For the part of the lookup using unqualified name lookup (
87
+ [[basic.lookup.unqual]]), only function declarations from the template
 
88
  definition context are found.
89
  - For the part of the lookup using associated namespaces (
90
  [[basic.lookup.argdep]]), only function declarations found in either
91
  the template definition context or the template instantiation context
92
  are found.
93
 
94
+ If the call would be ill-formed or would find a better match had the
95
+ lookup within the associated namespaces considered all the function
96
+ declarations with external linkage introduced in those namespaces in all
97
+ translation units, not just considering those declarations found in the
98
+ template definition and template instantiation contexts, then the
99
+ program has undefined behavior.
 
100