File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed
docs/error-messages/compiler-errors-2 Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -20,30 +20,34 @@ The following sample generates C2992:
20
20
// C2992.cpp
21
21
// compile with: /c
22
22
template <class T >
23
- struct TC1 {
23
+ struct Outer {
24
24
template <class U >
25
- struct TC2 ;
25
+ struct Inner ;
26
26
};
27
27
28
- template <class T > struct TC1<T >::TC2 {}; // C2992
28
+ template <class T > // C2992
29
+ struct Outer<T >::Inner {};
29
30
30
- // OK
31
31
template <class T >
32
- template <class U >
33
- struct TC1<T >::TC2 {};
34
- // C2992 can also occur when using generics:
35
- // C2992c.cpp
36
- // compile with: /clr /c
32
+ template <class U > // OK
33
+ struct Outer<T >::Inner {};
34
+ ```
35
+
36
+ C2992 can also occur when using generics:
37
+
38
+ ```cpp
39
+ // C2992b.cpp
40
+ // compile with: /c /clr
37
41
generic <class T>
38
- ref struct GC1 {
42
+ ref struct Outer {
39
43
generic <class U>
40
- ref struct GC2 ;
44
+ ref struct Inner ;
41
45
};
42
46
43
- generic <class T > ref struct GC1<T >::GC2 {}; // C2992
47
+ generic <class T> // C2992
48
+ ref struct Outer<T>::Inner {};
44
49
45
- // OK
46
50
generic <class T>
47
- generic <class U >
48
- ref struct GC1 <T >::GC2 {};
51
+ generic <class U> // OK
52
+ ref struct Outer <T>::Inner {};
49
53
```
You can’t perform that action at this time.
0 commit comments