Skip to content

Commit 4dc1b84

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3281, C3350]
1 parent 93d6acf commit 4dc1b84

26 files changed

+64
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: bac2ac89-c360-4c24-bb81-c20c62ece9ba
1010

1111
> generic parameter lists can only appear on managed or WinRTclasses, structs, or functions
1212
13+
## Remarks
14+
1315
A generic parameter list was used incorrectly. For more information, see [Generics](../../extensions/generics-cpp-component-extensions.md).
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: c51d912c-cde3-4928-904e-26734c8954ce
1010

1111
> 'type' : an interface cannot have an instance constructor
1212
13+
## Remarks
14+
1315
A CLR [interface](../../extensions/interface-class-cpp-component-extensions.md) cannot have an instance constructor. A static constructor is allowed.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: e582f316-e9db-4d27-9c70-fdfa737a9d5f
1010

1111
> the constraints for generic parameter 'parameter' of function 'function' must match the constraints for generic parameter 'parameter' of function 'function'
1212
13+
## Remarks
14+
1315
A virtual generic function must use the same constraints as a virtual function with the same name and set of arguments in the base class.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 04e8f210-d67e-4810-b153-e1efe2986c8f
1010

1111
> for each statement cannot operate on variables of type 'type'
1212
13+
## Remarks
14+
1315
The `for each` statement repeats a group of embedded statements for each element in an array or an object collection.
1416

1517
See [for each, in](../../dotnet/for-each-in.md) for more information.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 554328c8-cf44-4f7d-a8d2-def74d28ecdd
1010

1111
> '*specifier*': an iteration variable cannot have any storage-class specifiers
1212
13+
## Remarks
14+
1315
A storage class can't be specified on an iteration variable. For more information, see [Storage classes (C++)](../../cpp/storage-classes-cpp.md) and [for each, in](../../dotnet/for-each-in.md).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: ed08a540-9751-46e1-9cbe-c51d6a49ffab
1010

1111
> 'type' : illegal dereference of a handle type
1212
13+
## Remarks
14+
1315
The compiler detected an illegal dereference of a handle type. You can dereference a handle type and assign it to a reference. For more information, see [Tracking Reference Operator](../../extensions/tracking-reference-operator-cpp-component-extensions.md).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3c1c623b-7fcf-43ab-a89a-8722532a8d29
1010

1111
> 'property' : a trivial property cannot be indexed
1212
13+
## Remarks
14+
1315
A property was declared incorrectly. Accessors must be defined for an indexed property. See [property](../../extensions/property-cpp-component-extensions.md) for more information.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 0baf684b-1143-4953-ac99-a2fa267d8017
1010

1111
> 'type' : a trivial property cannot have reference type
1212
13+
## Remarks
14+
1315
A property was declared incorrectly. When you declare a trivial property, the compiler creates a variable that the property will update, and it is not possible to have a tracking reference variable in a class.
1416

1517
See [property](../../extensions/property-cpp-component-extensions.md) and [Tracking Reference Operator](../../extensions/tracking-reference-operator-cpp-component-extensions.md) for more information.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: ed2e9f89-8dbc-4387-bc26-cc955e840858
1010

1111
> 'default' : cannot be the name of a trivial property
1212
13+
## Remarks
14+
1315
A trivial property cannot be named **`default`**. See [property](../../extensions/property-cpp-component-extensions.md) for more information.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: ead485cc-5471-4e10-b361-300589ff5b70
1010

1111
> the cli namespace cannot be reopened
1212
13+
## Remarks
14+
1315
The cli namespace cannot be declared in your code. For more information, see [Platform, default, and cli Namespaces](../../extensions/platform-default-and-cli-namespaces-cpp-component-extensions.md).
1416

1517
## Example

0 commit comments

Comments
 (0)