Skip to content

Commit 31ce480

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3801, C3850]
1 parent 18f5fe8 commit 31ce480

27 files changed

+72
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: bad5fb9a-ed9a-4c15-96e7-cf06e200a50d
1010

1111
> 'property': property has a type that is incompatible with one of its accessors 'accessor'
1212
13+
## Remarks
14+
1315
The type of a property defined with [property](../../cpp/property-cpp.md) does not match the return type for one of its accessor functions.
1416

17+
## Example
18+
1519
The following sample generates C3803:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 7c4cda28-ec96-4d04-937b-36dbd9944722
1010

1111
> 'property_accessor': the accessor methods for a property must either be all static or all non-static
1212
13+
## Remarks
14+
1315
When defining a non-trivial property, the accessor functions can be either static or instance, but not both.
1416

1517
See [property](../../extensions/property-cpp-component-extensions.md) for more information.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 166bbc35-5488-46b4-8e4c-9cd26ee5644e
1010

1111
> 'token' : unexpected token, expected either '}' or an identifier
1212
13+
## Remarks
14+
1315
When defining a property, an invalid token was encountered. Remove the invalid token.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 7e2b0aab-8c61-4e71-b9c1-fcaeb6a1b5ea
1010

1111
> 'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed
1212
13+
## Remarks
14+
1315
A type that derived from <xref:System.Runtime.InteropServices.ComImportAttribute> can only implement an interface.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 37eca584-c20c-464e-8e45-a987214b7ce4
1010

1111
> 'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces
1212
13+
## Remarks
14+
1315
Managed types and Windows Runtime types do not allow friends. To fix this error, do not declare friends inside managed or Windows Runtime types.
1416

17+
## Example
18+
1519
The following sample generates C3809:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 326ac706-9a5f-4851-b9d2-b90c64c75532
1010

1111
> 'property' must be the first token in a property declaration
1212
13+
## Remarks
14+
1315
When declaring a property, the `__property` keyword must be the first token on the line.
1416

1517
C3812 is only reachable using the obsolete compiler option **/clr:oldSyntax**.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: ffdbc489-71bf-4cd6-988c-f824c9ab3ceb
1010

1111
> a property declaration can only appear within the definition of a managed or WinRT type
1212
13+
## Remarks
14+
1315
A [property](../../dotnet/how-to-use-properties-in-cpp-cli.md) can only be declared within a managed or Windows Runtime type. Native types do not support the **`property`** keyword.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: c5a3b404-6341-4fd3-92af-152b404c4dde
1010

1111
> return type of method 'get_accessor' must match type of the last parameter of a setter
1212
13+
## Remarks
14+
1315
When declaring properties, the return value of the `get_accessor` method must match the last parameter in the declaration of the set accessor method.
1416

1517
C3815 is only reachable using the obsolete compiler option **/clr:oldSyntax**.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 2e52cc7f-e31c-41a3-8d6f-9f5fab3648c0
1010

1111
> 'declaration' was previously declared or defined with a different managed or WinRTmodifier
1212
13+
## Remarks
14+
1315
A forward declaration and an actual declaration require that there be no conflicts or inconsistencies in the declaration of attributes.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: c6dbb57a-c65e-4040-8dd2-85bd9d4fd337
1010

1111
> 'declaration' : property can only be applied to a function
1212
13+
## Remarks
14+
1315
The **`property`** keyword can only be a applied to a function definition.
1416

1517
C3817 is only reachable using the obsolete compiler option **/clr:oldSyntax**.

0 commit comments

Comments
 (0)