Skip to content

Commit 521ef63

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2611, C2650]
1 parent 486cd52 commit 521ef63

26 files changed

+94
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 3f2d5253-f24f-4724-83d0-6b2aa6a4e551
1010

1111
> 'token' : illegal following '~' (expected identifier)
1212
13+
## Remarks
14+
1315
The token is not an identifier.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 6faacfd6-4455-41a2-808e-0f6799f84d6d
1010

1111
> trailing 'char' illegal in base/member initializer list
1212
13+
## Remarks
14+
1315
A character appears after the last base or member in an initializer list.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: d8fa7b32-08cb-4bb4-96e7-c04dded0e917
1010

1111
> trailing ',' illegal in base class list
1212
13+
## Remarks
14+
1315
A comma appears after the last base in a base class list.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ helpviewer_keywords: ["C2614"]
99

1010
> 'class1' : illegal member initialization: 'class2' is not a base or member
1111
12+
## Remarks
13+
1214
Only member or base classes can appear in the initialization list for a class or structure.
1315

1416
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 8d0c02d6-a0b0-4135-b10f-438d67da68c6
1010

1111
> 'conversion' : cannot implicitly convert a non-lvalue 'type1' to a 'type2' that is not const
1212
13+
## Remarks
14+
1315
A reference cannot be initialized from a non-lvalue.
1416

1517
This is an error under ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) and a warning under Microsoft extensions (**/Ze**).

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: d6a435d2-7d95-4dbf-ad4a-abe4744f63e8
1010

1111
> 'function' : inconsistent return statement
1212
13+
## Remarks
14+
1315
The specified function does not have a declared return type, and a previous return statement did not supply a value.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: c826f8ab-d66a-4b79-a0b2-93b0af8c41ac
1010

1111
> 'identifier': a static data member is not allowed in an anonymous struct or union
1212
13+
## Remarks
14+
1315
A member of an anonymous struct or union is declared **`static`**.
1416

17+
## Example
18+
1519
The following sample generates C2619, and demonstrates how to fix it by removing the static keyword.
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 32f2ec15-a7cd-4049-a64b-131746d3152b
1010

1111
> local classes cannot be used to declare 'extern' variables
1212
13+
## Remarks
14+
1315
A local class or structure cannot be used to declare **`extern`** variables.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 4c283ad0-251b-4571-bc18-468b9836746f
1010

1111
> 'identifier': a private or protected data member is not allowed in an anonymous struct or union
1212
13+
## Remarks
14+
1315
A member of an anonymous struct or union must have public access.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 7fc6c5ac-c7c9-4f0b-ad52-f52252526458
1010

1111
> 'function' : member function not allowed in anonymous union
1212
13+
## Remarks
14+
1315
An [anonymous union](../../cpp/unions.md#anonymous_unions) cannot have member functions.
1416

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

1721
```cpp

0 commit comments

Comments
 (0)