Skip to content

Commit bfab9ee

Browse files
authored
Merge pull request #5729 from Rageking8/structure-warning-references-in-range-c4661-c4700
Structure warning references in range [C4661, C4700]
2 parents 8c1762a + acea0a3 commit bfab9ee

28 files changed

+158
-121
lines changed

docs/error-messages/compiler-warnings/c4698.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn about the cause and fixes for Compiler warning (level 3) C4698."
32
title: "Compiler warning (Level 4) C4698"
3+
description: "Learn about the cause and fixes for Compiler warning (level 3) C4698."
44
ms.date: 04/18/2021
55
f1_keywords: ["C4698"]
66
helpviewer_keywords: ["C4698"]

docs/error-messages/compiler-warnings/compiler-warning-c4687.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning C4687"
32
title: "Compiler Warning C4687"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning C4687"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4687"]
66
helpviewer_keywords: ["C4687"]
7-
ms.assetid: 2f28e0b1-7358-4c88-bd70-aad8f0aa004c
87
---
98
# Compiler Warning C4687
109

@@ -20,7 +19,7 @@ C4687 is issued as an error by default. You can suppress C4687 with the [warning
2019

2120
## Example
2221

23-
The following sample generates C4687.
22+
The following example generates C4687.
2423

2524
```cpp
2625
// C4687.cpp

docs/error-messages/compiler-warnings/compiler-warning-c4693.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Warning C4693"
32
title: "Compiler Warning C4693"
4-
ms.date: "10/25/2017"
3+
description: "Learn more about: Compiler Warning C4693"
4+
ms.date: 10/25/2017
55
f1_keywords: ["C4693"]
66
helpviewer_keywords: ["C4693"]
7-
ms.assetid: 72d8db01-5e6f-4794-8731-76107e8f064a
87
---
98
# Compiler Warning C4693
109

1110
> 'class': a sealed abstract class cannot have any instance members 'Test'
1211
12+
## Remarks
13+
1314
If a type is marked [sealed](../../extensions/sealed-cpp-component-extensions.md) and [abstract](../../extensions/abstract-cpp-component-extensions.md), it can only have static members.
1415

1516
This warning is automatically promoted to an error. If you wish to modify this behavior, use [#pragma warning](../../preprocessor/warning.md).
1617

1718
## Example
1819

19-
The following sample generates C4693.
20+
The following example generates C4693.
2021

2122
```cpp
2223
// C4693.cpp

docs/error-messages/compiler-warnings/compiler-warning-c4694.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
description: "Learn more about: Compiler Warning C4694"
32
title: "Compiler Warning C4694"
4-
ms.date: "10/25/2017"
3+
description: "Learn more about: Compiler Warning C4694"
4+
ms.date: 10/25/2017
55
f1_keywords: ["C4694"]
66
helpviewer_keywords: ["C4694"]
7-
ms.assetid: 5ca122bb-34f3-43ee-a21f-95802cd515f7
87
---
98
# Compiler Warning C4694
109

1110
> '*class*': a sealed abstract class cannot have a base-class '*base_class*'
1211
12+
## Remarks
13+
1314
An abstract and sealed class cannot inherit from a reference type; a sealed and abstract class can neither implement the base class functions nor allow itself to be used as a base class.
1415

1516
For more information, see [abstract](../../extensions/abstract-cpp-component-extensions.md), [sealed](../../extensions/sealed-cpp-component-extensions.md), and [Classes and Structs](../../extensions/classes-and-structs-cpp-component-extensions.md).
@@ -18,7 +19,7 @@ This warning is automatically promoted to an error. If you wish to modify this b
1819

1920
## Example
2021

21-
The following sample generates C4694.
22+
The following example generates C4694.
2223

2324
```cpp
2425
// C4694.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-and-level-4-c4700.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1 and level 4) C4700"
32
title: "Compiler Warning (level 1 and level 4) C4700"
3+
description: "Learn more about: Compiler Warning (level 1 and level 4) C4700"
44
ms.date: 08/30/2022
55
f1_keywords: ["C4700"]
66
helpviewer_keywords: ["C4700"]
7-
ms.assetid: 2da0deb4-77dd-4b05-98d3-b78d74ac4ca7
87
---
98
# Compiler Warning (level 1 and level 4) C4700
109

@@ -20,7 +19,7 @@ The [`/sdl` (Enable Additional Security Checks)](../../build/reference/sdl-enabl
2019

2120
## Example
2221

23-
This sample generates C4700 when variables `t`, `u`, and `v` are used before they're initialized, and shows the kind of garbage value that can result. Variables `x`, `y`, and `z` don't cause the warning, because they're initialized before use:
22+
This example generates C4700 when variables `t`, `u`, and `v` are used before they're initialized, and shows the kind of garbage value that can result. Variables `x`, `y`, and `z` don't cause the warning, because they're initialized before use:
2423

2524
```cpp
2625
// c4700.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4661.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4661"
32
title: "Compiler Warning (level 1) C4661"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4661"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4661"]
66
helpviewer_keywords: ["C4661"]
7-
ms.assetid: 603bb8b7-356d-4eef-924b-64d769bac5bd
87
---
98
# Compiler Warning (level 1) C4661
109

11-
'identifier' : no suitable definition provided for explicit template instantiation request
10+
> 'identifier' : no suitable definition provided for explicit template instantiation request
11+
12+
## Remarks
1213

1314
A member of the template class is not defined.
1415

1516
## Example
1617

18+
The following example generates C4661:
19+
1720
```cpp
1821
// C4661.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4662.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4662"
32
title: "Compiler Warning (level 1) C4662"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4662"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4662"]
66
helpviewer_keywords: ["C4662"]
7-
ms.assetid: 7efda273-d04a-47b7-ad65-ff1ff94b5ffc
87
---
98
# Compiler Warning (level 1) C4662
109

11-
explicit instantiation; template-class 'identifier1' has no definition from which to specialize 'identifier2'
10+
> explicit instantiation; template-class 'identifier1' has no definition from which to specialize 'identifier2'
11+
12+
## Remarks
1213

1314
The specified template-class was declared, but not defined.
1415

1516
## Example
1617

18+
The following example generates C4662:
19+
1720
```cpp
1821
// C4662.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4667.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4667"
32
title: "Compiler Warning (level 1) C4667"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4667"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4667"]
66
helpviewer_keywords: ["C4667"]
7-
ms.assetid: 5d2b7fe0-4f0e-4cd6-b432-ca02c3d194ab
87
---
98
# Compiler Warning (level 1) C4667
109

11-
'function' : no function template defined that matches forced instantiation
10+
> 'function' : no function template defined that matches forced instantiation
11+
12+
## Remarks
1213

1314
You cannot instantiate a function template that has not been declared.
1415

15-
The following sample will cause C4667:
16+
## Example
17+
18+
The following example will cause C4667:
1619

1720
```cpp
1821
// C4667a.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4669.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4669"
32
title: "Compiler Warning (level 1) C4669"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4669"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4669"]
66
helpviewer_keywords: ["C4669"]
7-
ms.assetid: 97730679-e3dc-44d4-b2a8-aa65badc17f2
87
---
98
# Compiler Warning (level 1) C4669
109

11-
'cast' : unsafe conversion: 'class' is a managed or WinRT type object
10+
> 'cast' : unsafe conversion: 'class' is a managed or WinRT type object
11+
12+
## Remarks
1213

1314
A cast contains a Windows Runtime or managed type. The compiler completes the cast by performing a bit-wise copy of one pointer to the other, but provides no other checking. To resolve this warning, do not cast classes containing managed members or Windows Runtime types.
1415

15-
The following sample generates C4669 and shows how to fix it:
16+
## Example
17+
18+
The following example generates C4669 and shows how to fix it:
1619

1720
```cpp
1821
// C4669.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4674.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4674"
32
title: "Compiler Warning (level 1) C4674"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4674"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4674"]
66
helpviewer_keywords: ["C4674"]
7-
ms.assetid: 638dae0b-b82c-4865-9599-72630827ca09
87
---
98
# Compiler Warning (level 1) C4674
109

11-
'method' should be declared 'static' and have exactly one parameter
10+
> 'method' should be declared 'static' and have exactly one parameter
11+
12+
## Remarks
1213

1314
The signature of a conversion operator was not correct. The method is not considered a user-defined conversion. For more information on defining operators, see [User-Defined Operators (C++/CLI)](../../dotnet/user-defined-operators-cpp-cli.md) and [User-Defined Conversions (C++/CLI)](../../dotnet/user-defined-conversions-cpp-cli.md).
1415

1516
## Example
1617

17-
The following sample generates C4674.
18+
The following example generates C4674.
1819

1920
```cpp
2021
// C4674.cpp

0 commit comments

Comments
 (0)