From Jason Turner

[temp.dep.namespace]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp4lj6111t/{from.md → to.md} +26 -0
tmp/tmp4lj6111t/{from.md → to.md} RENAMED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Dependent namespaces <a id="temp.dep.namespace">[[temp.dep.namespace]]</a>
2
+
3
+ A namespace alias is dependent if it is introduced by a
4
+ *namespace-alias-definition* whose *qualified-namespace-specifier* (if
5
+ any) is a dependent qualified name or whose *splice-specifier* (if any)
6
+ is dependent. A *namespace-name* is dependent if it names a dependent
7
+ namespace alias.
8
+
9
+ [*Example 1*:
10
+
11
+ ``` cpp
12
+ template<std::meta::info R>
13
+ int fn() {
14
+ namespace Alias = [:R:]; // [:R:] is dependent
15
+ return typename Alias::T{}; // Alias is dependent
16
+ }
17
+
18
+ namespace NS {
19
+ using T = int;
20
+ }
21
+
22
+ int a = fn<^^NS>();
23
+ ```
24
+
25
+ — *end example*]
26
+