Skip to content

Commit 28e3e80

Browse files
Merge pull request #5474 from Rageking8/remove-outdated-example-and-update-c2998-error-reference
Remove outdated example and update C2998 error reference
2 parents 2433722 + 21a1b6e commit 28e3e80

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Error C2998"
32
title: "Compiler Error C2998"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2998"
4+
ms.date: 06/29/2025
55
f1_keywords: ["C2998"]
66
helpviewer_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.

docs/error-messages/compiler-errors-2/compiler-errors-c2900-through-c3499.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)