Skip to content

Commit df6e56d

Browse files
authored
Add "Remarks" and "Example" headings for warning references in range [C4661, C4700]
1 parent e0f7543 commit df6e56d

22 files changed

+61
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 72d8db01-5e6f-4794-8731-76107e8f064a
1010

1111
> 'class': a sealed abstract class cannot have any instance members 'Test'
1212
13+
## Remarks
14+
1315
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.
1416

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 5ca122bb-34f3-43ee-a21f-95802cd515f7
1010

1111
> '*class*': a sealed abstract class cannot have a base-class '*base_class*'
1212
13+
## Remarks
14+
1315
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.
1416

1517
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).

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 603bb8b7-356d-4eef-924b-64d769bac5bd
1010

1111
> 'identifier' : no suitable definition provided for explicit template instantiation request
1212
13+
## Remarks
14+
1315
A member of the template class is not defined.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 7efda273-d04a-47b7-ad65-ff1ff94b5ffc
1010

1111
> explicit instantiation; template-class 'identifier1' has no definition from which to specialize 'identifier2'
1212
13+
## Remarks
14+
1315
The specified template-class was declared, but not defined.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 5d2b7fe0-4f0e-4cd6-b432-ca02c3d194ab
1010

1111
> 'function' : no function template defined that matches forced instantiation
1212
13+
## Remarks
14+
1315
You cannot instantiate a function template that has not been declared.
1416

17+
## Example
18+
1519
The following sample will cause C4667:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 97730679-e3dc-44d4-b2a8-aa65badc17f2
1010

1111
> 'cast' : unsafe conversion: 'class' is a managed or WinRT type object
1212
13+
## Remarks
14+
1315
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.
1416

17+
## Example
18+
1519
The following sample generates C4669 and shows how to fix it:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 638dae0b-b82c-4865-9599-72630827ca09
1010

1111
> 'method' should be declared 'static' and have exactly one parameter
1212
13+
## Remarks
14+
1315
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).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: a8d656a1-e2ff-4f8b-9028-201765131026
1010

1111
> 'function': signature of non-private member contains assembly private type 'private_type'
1212
13+
## Remarks
14+
1315
A type that has public accessibility outside the assembly uses a type that has private access outside the assembly. A component that references the public assembly type will not be able to use the type member or members that reference the assembly private type.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 0c588f34-595d-4e5c-9470-8723fca2cc06
1010

1111
> base class 'base_type' is less accessible than 'derived_type'
1212
13+
## Remarks
14+
1315
A public type derives from a private type. If the public type is instantiated in a referenced assembly, members of the private base type will not be accessible.
1416

1517
C4678 is only reachable using the obsolete compiler option **/clr:oldSyntax**. It is an error when using **/clr**, to have a base class that is less accessible that its derived class.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3cc74150-42a8-4116-94cd-4ef0fd6dcf32
1010

1111
> '*member*' : could not import member
1212
13+
## Remarks
14+
1315
The compiler encountered a construct that it cannot support, that cannot be imported from metadata.
1416

1517
Do not try to use the construct.

0 commit comments

Comments
 (0)