Skip to content

Commit 1fcc773

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2581, C2610]
1 parent 049e07e commit 1fcc773

18 files changed

+60
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 24a4e4c1-24d3-4e42-b760-7dcaf9740b16
1010

1111
> 'type' : static 'operator =' function is illegal
1212
13+
## Remarks
14+
1315
The assignment (`=`) operator is incorrectly declared as **`static`**. Assignment operators cannot be **`static`**. For more information, see [User-Defined Operators (C++/CLI)](../../dotnet/user-defined-operators-cpp-cli.md).
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: ee1b9378-8bcd-4792-b87e-6d7a466d29ed
1010

1111
> 'function' function is unavailable in 'type'
1212
13+
## Remarks
14+
1315
An attempt was made to assign to an object that does not have an assignment operator.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 836e2c0a-86c0-4742-b432-beb0191ad20e
1010

1111
> 'Class' : direct base 'Base2' is inaccessible; already a base of 'Base1'
1212
13+
## Remarks
14+
1315
`Class` already derives directly from `Base1`. `Base2` also derives from `Base1`. `Class` cannot derive from `Base2` because that would mean inheriting (indirectly) from `Base1` again, which is not legal because `Base1` is already a direct base class.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 05bb1a9c-28fb-4a88-a1b5-aea85ebdee1c
1010

1111
> explicit conversion to 'type' is ambiguous
1212
13+
## Remarks
14+
1315
The type conversion can produce more than one result.
1416

1517
### To fix by checking the following possible causes

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: dae703c7-5c38-4db6-8411-4d1b22713eb5
1010

1111
> incorrect user-defined conversion syntax : illegal indirections
1212
13+
## Remarks
14+
1315
Indirection of a conversion operator is not allowed.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 7637a2c7-35d4-4b5a-a8f2-515a7bda98fd
1010

1111
> 'identifier' : illegal use of local variable as default parameter
1212
13+
## Remarks
14+
1315
Local variables are not allowed as default parameters.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 19a0cabd-ca13-44a5-9be3-ee676abf9bc4
1010

1111
> '::~identifier' : illegal global destructor
1212
13+
## Remarks
14+
1315
The destructor is defined for something other than a class, structure, or union. This is not allowed.
1416

1517
This error can be caused by a missing class, structure, or union name on the left side of the scope resolution (`::`) operator.
1618

19+
## Example
20+
1721
The following sample generates C2588:
1822

1923
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 1d7942c7-8a81-4bb4-b272-76a0019e8513
1010

1111
> 'identifier' : illegal token on right side of '::'
1212
13+
## Remarks
14+
1315
If a class, structure, or union name appears to the left of the scope-resolution operator (double colons), the token on the right must be a class, structure, or union member. Otherwise, any global identifier can appear on the right.
1416

1517
The scope-resolution operator cannot be overloaded.
1618

19+
## Example
20+
1721
The following sample generates C2589:
1822

1923
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 833a4d7b-66ef-4d4c-ae83-a533c2b0eb07
1010

1111
> 'class': 'base_class_2' is inherited from 'base_class_1' and cannot be re-specified
1212
13+
## Remarks
14+
1315
You can only specify base classes that do not inherit from other base classes. In this case, only `base_class_1` is needed in the specification of **`class`** because `base_class_1` already inherits `base_class_2`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 4a0fe9bb-2163-447d-91f6-1890ed8250f6
1010

1111
> 'operator identifier' is ambiguous
1212
13+
## Remarks
14+
1315
More than one possible operator is defined for an overloaded operator.
1416

1517
This error may be fixed if you use an explicit cast on one or more actual parameters.
1618

19+
## Examples
20+
1721
The following sample generates C2593:
1822

1923
```cpp

0 commit comments

Comments
 (0)