Skip to content

Commit c2a6a08

Browse files
author
Colin Robertson
authored
Update obsolete errors per 4310 (#4325)
1 parent f4e41f2 commit c2a6a08

32 files changed

+845
-790
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
description: "Learn more about: Compiler Error C2834"
33
title: "Compiler Error C2834"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2834"]
66
helpviewer_keywords: ["C2834"]
77
ms.assetid: 28f9f6eb-ab2a-4e64-aaaa-9d14f955de41
88
---
99
# Compiler Error C2834
1010

11-
'operator operator' must be globally qualified
11+
> 'operator *operator-name*' must be globally qualified
1212
1313
The `new` and `delete` operators are tied to the class where they reside. Scope resolution cannot be used to select a version of `new` or `delete` from a different class. To implement multiple forms of the `new` or `delete` operator, create a version of the operator with extra formal parameters.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
description: "Learn more about: Compiler Error C2858"
33
title: "Compiler Error C2858"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2858"]
66
helpviewer_keywords: ["C2858"]
77
ms.assetid: 1fb1d770-307e-476e-9984-a1d8f8ce2820
88
---
99
# Compiler Error C2858
1010

11-
command-line option '/Yc (/Fdfilename)' inconsistent with precompiled header, which used '/Fdfilename'
11+
> command-line option '/Yc (/Fd*filename1*)' inconsistent with precompiled header, which used '/Fd*filename2*'
1212
13-
The program database specified by the Use Precompiled Header ([/Yu](../../build/reference/yu-use-precompiled-header-file.md)) option is not the one specified by the previous Create Precompiled Header ([/Yc](../../build/reference/yc-create-precompiled-header-file.md)) option.
13+
The program database specified by the Use Precompiled Header ([`/Yu`](../../build/reference/yu-use-precompiled-header-file.md)) option is not the one specified by the previous Create Precompiled Header ([`/Yc`](../../build/reference/yc-create-precompiled-header-file.md)) option.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.

docs/error-messages/compiler-errors-2/compiler-error-c2875.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ ms.assetid: d589fc0c-08b2-4a79-bc0e-dca5eb80bdd5
88
---
99
# Compiler Error C2875
1010

11-
using-declaration causes a multiple declaration of 'class::identifier'
11+
> using-declaration causes a multiple declaration of 'class::identifier'
1212
1313
The declaration causes the same item to be defined twice.
1414

15+
This error is obsolete in Visual Studio 2022 and later versions.
16+
1517
The following sample generates C2875:
1618

1719
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c2896.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2896"
33
title: "Compiler Error C2896"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2896"]
66
helpviewer_keywords: ["C2896"]
77
ms.assetid: b600407b-cb05-42e3-9069-2aa6960f0eaa
88
---
99
# Compiler Error C2896
1010

11-
'function1' : cannot use function template 'function2' as argument
11+
> '*function1*' : cannot use function template '*function2*' as argument
1212
13-
A function template cannot be an argument to another function template.
13+
A function template can't be an argument to another function template.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2896:
1618

docs/error-messages/compiler-errors-2/compiler-error-c2902.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
---
22
description: "Learn more about: Compiler Error C2902"
33
title: "Compiler Error C2902"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2902"]
66
helpviewer_keywords: ["C2902"]
77
ms.assetid: 89d78d0e-78e5-4c2c-a0f9-a60110e9395e
88
---
99
# Compiler Error C2902
1010

11-
'token' : unexpected token following 'template', identifier expected
11+
> '*token*' : unexpected token following '*template*', identifier expected
1212
1313
The token following the keyword **`template`** was not an identifier.
1414

15+
This error is obsolete in Visual Studio 2022 and later versions.
16+
1517
The following sample generates C2902:
1618

1719
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c2917.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
---
22
description: "Learn more about: Compiler Error C2917"
33
title: "Compiler Error C2917"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2917"]
66
helpviewer_keywords: ["C2917"]
77
ms.assetid: ec9da9ee-0f37-47b3-87dd-19ef5a14dc4c
88
---
99
# Compiler Error C2917
1010

11-
'name' : invalid template-parameter
11+
> '*name*' : invalid template-parameter
1212
13-
A template parameter list contains an identifier that was not a template parameter.
13+
## Remarks
14+
15+
A template parameter list contains an identifier that wasn't a template parameter.
16+
17+
This error is obsolete in Visual Studio 2022 and later versions.
1418

1519
## Example
1620

docs/error-messages/compiler-errors-2/compiler-error-c2931.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2931"
33
title: "Compiler Error C2931"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2931"]
66
helpviewer_keywords: ["C2931"]
77
ms.assetid: 33430407-b149-4ba3-baf8-b0dae1ea3a5d
88
---
99
# Compiler Error C2931
1010

11-
'class' : type-class-id redefined as a member function of 'identifier'
11+
'*class*' : type-class-id redefined as a member function of '*identifier*'
1212

13-
You cannot use a generic or template class as a member function of another class.
13+
You can't use a generic or template class as a member function of another class.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
This error can be caused if braces are improperly matched.
1618

docs/error-messages/compiler-errors-2/compiler-error-c2932.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ ms.assetid: c28e88d9-e654-4367-bfb4-13c780bca9bd
88
---
99
# Compiler Error C2932
1010

11-
'class' : type-class-id redefined as a data member of 'identifier'
11+
> '*class*' : type-class-id redefined as a data member of '*identifier*'
1212
13-
You cannot use a generic or template class as a data member.
13+
You can't use a generic or template class as a data member.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2932:
1618

docs/error-messages/compiler-errors-2/compiler-error-c2933.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2933"
33
title: "Compiler Error C2933"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2933"]
66
helpviewer_keywords: ["C2933"]
77
ms.assetid: 394891e3-6b52-4b61-83d2-a1c5125d9bd5
88
---
99
# Compiler Error C2933
1010

11-
'class' : type-class-id redefined as a typedef member of 'identifier'
11+
> '*class*' : type-class-id redefined as a typedef member of '*identifier*'
1212
13-
You cannot use a generic or template class as a **`typedef`** member.
13+
You can't use a generic or template class as a **`typedef`** member.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2933:
1618

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
description: "Learn more about: Compiler Error C2934"
33
title: "Compiler Error C2934"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2934"]
66
helpviewer_keywords: ["C2934"]
77
ms.assetid: b7f7e7aa-2d4c-4e17-8564-2c005ab81fd5
88
---
99
# Compiler Error C2934
1010

11-
'class' : type-class-id redefined as a nested 'item' of 'identifier'
11+
'*class*' : type-class-id redefined as a nested 'item' of '*identifier*'
1212

13-
You cannot use a generic or template class as a nested item.
13+
You can't use a generic or template class as a nested item.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.

docs/error-messages/compiler-errors-2/compiler-error-c2935.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2935"
33
title: "Compiler Error C2935"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2935"]
66
helpviewer_keywords: ["C2935"]
77
ms.assetid: e11ef90d-0756-4e43-8a09-4974c6aa72a3
88
---
99
# Compiler Error C2935
1010

11-
'class' : type-class-id redefined as a global function
11+
> '*class*' : type-class-id redefined as a global function
1212
13-
You cannot use a generic or template class as a global function.
13+
You can't use a generic or template class as a global function.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
This error can be caused if braces are improperly matched.
1618

docs/error-messages/compiler-errors-2/compiler-error-c2936.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2936"
33
title: "Compiler Error C2936"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2936"]
66
helpviewer_keywords: ["C2936"]
77
ms.assetid: 5d1ba0fc-0c78-4a37-a83b-1ef8527763be
88
---
99
# Compiler Error C2936
1010

11-
'class' : type-class-id redefined as a global data variable
11+
> '*class*' : type-class-id redefined as a global data variable
1212
13-
You cannot use a generic or template class as a global data variable.
13+
You can't use a generic or template class as a global data variable.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
This error can be caused if braces are improperly matched.
1618

docs/error-messages/compiler-errors-2/compiler-error-c2937.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2937"
33
title: "Compiler Error C2937"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2937"]
66
helpviewer_keywords: ["C2937"]
77
ms.assetid: 95671ca3-79f7-4b56-a5f2-a92296da1629
88
---
99
# Compiler Error C2937
1010

11-
'class' : type-class-id redefined as a global typedef
11+
> '*class*' : type-class-id redefined as a global typedef
1212
13-
You cannot use a generic or template class as a global **`typedef`**.
13+
You can't use a generic or template class as a global **`typedef`**.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2937:
1618

docs/error-messages/compiler-errors-2/compiler-error-c2939.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2939"
33
title: "Compiler Error C2939"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2939"]
66
helpviewer_keywords: ["C2939"]
77
ms.assetid: 455b050b-f2dc-4b5b-bd6a-e1f81d3d1644
88
---
99
# Compiler Error C2939
1010

11-
'class' : type-class-id redefined as a local data variable
11+
> '*class*' : type-class-id redefined as a local data variable
1212
13-
You cannot use a generic or template class as a local data variable.
13+
You can't use a generic or template class as a local data variable.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
This error can be caused if braces are improperly matched.
1618

docs/error-messages/compiler-errors-2/compiler-error-c2940.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2940"
33
title: "Compiler Error C2940"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2940"]
66
helpviewer_keywords: ["C2940"]
77
ms.assetid: af6bf2bf-8de6-4cfd-bbf0-4c6b32a30edf
88
---
99
# Compiler Error C2940
1010

11-
'class' : type-class-id redefined as a local typedef
11+
> '*class*' : type-class-id redefined as a local typedef
1212
13-
You cannot use a generic or template class as a local **`typedef`**.
13+
You can't use a generic or template class as a local **`typedef`**.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2940:
1618

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
description: "Learn more about: Compiler Error C2941"
33
title: "Compiler Error C2941"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2941"]
66
helpviewer_keywords: ["C2941"]
77
ms.assetid: 1bba94eb-5bf6-468d-8f84-96a6391a7048
88
---
99
# Compiler Error C2941
1010

11-
'class' : type-class-id redefined as a local 'item'
11+
> '*class*' : type-class-id redefined as a local 'item'
1212
13-
You cannot use a generic or template class as an item.
13+
You can't use a generic or template class as an item.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.

docs/error-messages/compiler-errors-2/compiler-error-c2942.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
---
22
description: "Learn more about: Compiler Error C2942"
33
title: "Compiler Error C2942"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2942"]
66
helpviewer_keywords: ["C2942"]
77
ms.assetid: 13abf744-8fa1-450d-886d-e5717c04956e
88
---
99
# Compiler Error C2942
1010

11-
'class' : type-class-id redefined as a formal argument of a function
11+
> '*class*' : type-class-id redefined as a formal argument of a function
1212
13-
You cannot use a generic or template class as a formal argument. You cannot pass an argument directly to the constructor of a generic or template class.
13+
You can't use a generic or template class as a formal argument. You cannot pass an argument directly to the constructor of a generic or template class.
1414

15-
The following sample generates C2942:
15+
This error is obsolete in Visual Studio 2022 and later versions.
1616

17-
```
17+
The following sample generates C2942:
1818

19+
```cpp
1920
// C2942.cpp
2021
// compile with: /c
2122
template<class T>

docs/error-messages/compiler-errors-2/compiler-error-c2943.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2943"
33
title: "Compiler Error C2943"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2943"]
66
helpviewer_keywords: ["C2943"]
77
ms.assetid: ede6565e-d892-44c0-8eee-c69545f3be2e
88
---
99
# Compiler Error C2943
1010

11-
'class' : type-class-id redefined as a type argument of a template
11+
> '*class*' : type-class-id redefined as a type argument of a template
1212
13-
You cannot use a generic or template class, instead of a symbol, as a generic or template type argument.
13+
You can't use a generic or template class, instead of a symbol, as a generic or template type argument.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2943:
1618

docs/error-messages/compiler-errors-2/compiler-error-c2944.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
description: "Learn more about: Compiler Error C2944"
33
title: "Compiler Error C2944"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/01/2022
55
f1_keywords: ["C2944"]
66
helpviewer_keywords: ["C2944"]
77
ms.assetid: f209e668-e72f-442a-a438-8c4ff43a404a
88
---
99
# Compiler Error C2944
1010

11-
'class' : type-class-id redefined as a value argument of a template
11+
> '*class*' : type-class-id redefined as a value argument of a template
1212
13-
You cannot use a generic or template class, instead of a symbol, as a template value argument.
13+
You can't use a generic or template class, instead of a symbol, as a template value argument.
14+
15+
This error is obsolete in Visual Studio 2022 and later versions.
1416

1517
The following sample generates C2944:
1618

0 commit comments

Comments
 (0)