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 1
1
---
2
- description : " Learn more about: Compiler Error C2998"
3
2
title : " Compiler Error C2998"
4
- ms.date : " 11/04/2016"
3
+ description : " Learn more about: Compiler Error C2998"
4
+ ms.date : 06/29/2025
5
5
f1_keywords : ["C2998"]
6
6
helpviewer_keywords : ["C2998"]
7
- ms.assetid : 8193d491-b5d9-4477-acb1-cf166889c070
8
7
---
9
8
# Compiler Error C2998
10
9
11
- ' identifier' : cannot be a template definition
10
+ > ' * identifier* ' : cannot be a template definition
12
11
13
- The compiler could not process the syntax used in the template definition.
12
+ ## Remarks
14
13
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
113
113
| [ Compiler error C2995] ( compiler-error-c2995.md ) | '* declaration* ': function template has already been defined |
114
114
| [ Compiler error C2996] ( compiler-error-c2996.md ) | '* function* ': recursive function template definition |
115
115
| 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 |
117
117
118
118
## See also
119
119
You can’t perform that action at this time.
0 commit comments