File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
docs/error-messages/compiler-errors-2 Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 11---
2- description : " Learn more about: Compiler Error C2998"
32title : " Compiler Error C2998"
4- ms.date : " 11/04/2016"
3+ description : " Learn more about: Compiler Error C2998"
4+ ms.date : 06/29/2025
55f1_keywords : ["C2998"]
66helpviewer_keywords : ["C2998"]
7- ms.assetid : 8193d491-b5d9-4477-acb1-cf166889c070
87---
98# Compiler Error C2998
109
11- ' identifier' : cannot be a template definition
10+ > ' * identifier* ' : cannot be a template definition
1211
13- The compiler could not process the syntax used in the template definition.
12+ ## Remarks
1413
15- The following sample generates C2998:
16-
17- ``` cpp
18- // C2998.cpp
19- // compile with: /c
20- template <class T > int x = 1018 ; // C2998
21- ```
14+ The compiler could not process the syntax used in the template definition.
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ The articles in this section of the documentation explain a subset of the error
113113| [ Compiler error C2995] ( compiler-error-c2995.md ) | '* declaration* ': function template has already been defined |
114114| [ Compiler error C2996] ( compiler-error-c2996.md ) | '* function* ': recursive function template definition |
115115| Compiler error C2997 | '* function* ': array bound cannot be deduced from a default member initializer |
116- | [ Compiler error C2998] ( compiler-error-c2998.md ) | '* declarator * ': cannot be a template definition |
116+ | [ Compiler error C2998] ( compiler-error-c2998.md ) | '* identifier * ': cannot be a template definition |
117117
118118## See also
119119
You can’t perform that action at this time.
0 commit comments