Skip to content

Commit 6f9458e

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3131, C3160]
1 parent df5b076 commit 6f9458e

23 files changed

+77
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 38f20fac-83c9-4cd9-b7b5-74ca8f650ea6
1010

1111
> project must have a 'module' attribute with a 'name' property
1212
13+
## Remarks
14+
1315
The [module](../../windows/attributes/module-cpp.md) attribute must have a name parameter.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: d54a3d12-336a-4ed0-ad4e-43cddac33b5e
1010

1111
> 'function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array'
1212
13+
## Remarks
14+
1315
The <xref:System.ParamArrayAttribute> attribute was applied to a parameter that was not a single-dimension array.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 4a709405-b67b-4061-8a2a-19fa5fb34a2a
1010

1111
> Attributes cannot be applied to C++ varargs
1212
13+
## Remarks
14+
1315
An attribute was applied incorrectly. Attributes can not be applied to an ellipsis representing variable arguments.
1416

1517
For more information, see [User-Defined Attributes](../../extensions/user-defined-attributes-cpp-component-extensions.md).

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: f887e4d2-7740-49e4-9972-7edceb8fa77b
1010

1111
> 'value' : value of attribute argument 'attribute' does not have valid type 'type'
1212
13+
## Remarks
14+
1315
A syntax error was detected when a value was assigned to an attribute.
1416

1517
## See also

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: e92ee007-5a26-47f4-8ef4-339f2d9528d1
1010

1111
> 'property' : a property cannot have a 'const' or 'volatile' type
1212
13+
## Remarks
14+
1315
The [const](../../cpp/const-cpp.md) and [volatile](../../cpp/volatile-cpp.md) keywords are not permitted on properties.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: c77103cd-00f7-408e-b74b-4f8562039d31
1010

1111
> 'interface' : a COM interface can only inherit from another COM interface, 'interface' is not a COM interface
1212
13+
## Remarks
14+
1315
An interface to which you applied an [interface attribute](../../windows/attributes/interface-attributes.md) inherits from an interface that is not a COM interface. A COM interface ultimately inherits from `IUnknown`. Any interface preceded by an interface attribute is a COM interface.
1416

17+
## Example
18+
1519
The following example generates C3136:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 70bb1313-2e87-43ed-a0d8-33fa6ff475e4
1010

1111
> 'property' : a property cannot be initialized
1212
13+
## Remarks
14+
1315
A property cannot be initialized, for example, in a constructor's initialization list.
1416

17+
## Example
18+
1519
The following example generates C3137:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 364ee9e8-9358-410e-bd35-9c4a226a3753
1010

1111
> 'interface' : a 'attribute' interface must inherit from IDispatch, or from an interface that inherits from IDispatch
1212
13+
## Remarks
14+
1315
An interface with the [dual](../../windows/attributes/dual.md) or [dispinterface](../../windows/attributes/dispinterface.md) attributes does not have `IDispatch` as a direct or indirect base interface.
1416

17+
## Example
18+
1519
The following example generates C3138:
1620

1721
```cpp

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ ms.assetid: 95c92263-10ac-4ff3-b385-6312dd92adbc
1010

1111
> 'struct' : cannot export a UDT without members
1212
13-
You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type). For example:
13+
## Remarks
14+
15+
You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type).
16+
17+
## Example
18+
19+
For example:
1420

1521
```cpp
1622
// C3139.cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 122f8943-fac3-4db8-a3a8-2c5d19233de6
1010

1111
> cannot have multiple 'module' attributes in the same compilation unit
1212
13+
## Remarks
14+
1315
The [module](../../windows/attributes/module-cpp.md) attribute can only be defined once per project.
1416

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

1721
```cpp

0 commit comments

Comments
 (0)