Skip to content

Commit 87b93d2

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3741, C3800]
1 parent b286800 commit 87b93d2

26 files changed

+70
-4
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: ed311315-cc32-49c9-97fa-01b293d81526
1010

1111
> 'class': must be a coclass when the 'layout_dependent' parameter of event_receiver = true
1212
13+
## Remarks
14+
1315
When `layout_dependent=true` for an [event_receiver](../../windows/attributes/event-receiver.md) class, then the class must also have the [coclass](../../windows/attributes/coclass.md) attribute.
1416

17+
## Example
18+
1519
The following sample generates C3741
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 7ca9a76e-7b60-46d1-ab8b-18600cf1a306
1010

1111
> can only hook/unhook an entire interface when the 'layout_dependent' parameter of event_receiver is true
1212
13+
## Remarks
14+
1315
The [__unhook](../../cpp/unhook.md) function varies in the number of parameters that it takes based on the value passed to the `layout_dependent` parameter in the [event_receiver](../../windows/attributes/event-receiver.md) class.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: a447d050-80d1-406a-9a6e-f15c527d717c
1010

1111
> __unhook must have at least 3 arguments for managed events
1212
13+
## Remarks
14+
1315
The [`__unhook`](../../cpp/unhook.md) function must take three parameters when used in a program that is compiled for Managed Extensions for C++.
1416

1517
**`__hook`** and **`__unhook`** are not compatible with **`/clr`** programming. Use the += and -= operators instead.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 1e64aec5-7e53-47e5-bc7d-3905230cfc66
1010

1111
> 'function': only an event can be 'raised'
1212
13+
## Remarks
14+
1315
Only a function defined with the [__event](../../cpp/event.md) keyword can be passed to the [__raise](../../cpp/raise.md) keyword.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: a9a4be67-5d9c-4dcc-9ae9-baae46cbecde
1010

1111
> missing default type parameter : parameter param
1212
13+
## Remarks
14+
1315
Generic or template parameters with default values cannot be followed in the parameter list by parameters that do not have default values.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 6fe71a0a-dd93-4ce6-9729-b9616360cf34
1010

1111
> 'interface': managed interfaces may not fire events
1212
13+
## Remarks
14+
1315
The [__event](../../cpp/event.md) keyword cannot appear inside an interface.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3d26b468-4757-41b8-b5a2-78022a5295fb
1010

1111
> 'attribute': a custom attribute may not be used inside a function
1212
13+
## Remarks
14+
1315
A custom attribute cannot be used inside a function. For more information on custom attributes, see the topic [attribute](../../windows/attributes/attribute.md).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 1ac81d85-0f5a-4f39-95b6-42fd43cb18d5
1010

1111
> 'attribute class': cannot classify attribute; 'keyword' should not be used in this context
1212
13+
## Remarks
14+
1315
A user-defined attribute was applied incorrectly.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: a5b99e28-796c-4107-a673-97c2ae3bb2b9
1010

1111
> a generic property is not allowed
1212
13+
## Remarks
14+
1315
Generic parameter lists can only appear on managed classes, structs, or functions.
1416

1517
For more information, see [Generics](../../extensions/generics-cpp-component-extensions.md) and [property](../../extensions/property-cpp-component-extensions.md).

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 14b877bc-9277-40ec-af1c-196a58b45f10
1010

1111
> delegate constructor: member function 'function' cannot be called on an instance of type 'type'
1212
13+
## Remarks
14+
1315
A call was made to a function through a pointer to a type that does not contain the function.
1416

1517
## Example

0 commit comments

Comments
 (0)