Skip to content

Commit 857ae18

Browse files
authored
Merge pull request #5609 from Rageking8/structure-error-references-in-range-c2581-c2610
Structure error references in range [C2581, C2610]
2 parents 4b79e18 + a2914fa commit 857ae18

18 files changed

+128
-86
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2581"
32
title: "Compiler Error C2581"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2581"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2581"]
66
helpviewer_keywords: ["C2581"]
7-
ms.assetid: 24a4e4c1-24d3-4e42-b760-7dcaf9740b16
87
---
98
# Compiler Error C2581
109

11-
'type' : static 'operator =' function is illegal
10+
> 'type' : static 'operator =' function is illegal
11+
12+
## Remarks
1213

1314
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).
1415

1516
## Example
1617

17-
The following sample generates C2581.
18+
The following example generates C2581.
1819

1920
```cpp
2021
// C2581.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2582"
32
title: "Compiler Error C2582"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2582"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2582"]
66
helpviewer_keywords: ["C2582"]
7-
ms.assetid: ee1b9378-8bcd-4792-b87e-6d7a466d29ed
87
---
98
# Compiler Error C2582
109

11-
'function' function is unavailable in 'type'
10+
> 'function' function is unavailable in 'type'
11+
12+
## Remarks
1213

1314
An attempt was made to assign to an object that does not have an assignment operator.
1415

15-
The following sample generates C2582:
16+
## Example
17+
18+
The following example generates C2582:
1619

1720
```cpp
1821
// C2582.cpp

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2584"
32
title: "Compiler Error C2584"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2584"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2584"]
66
helpviewer_keywords: ["C2584"]
7-
ms.assetid: 836e2c0a-86c0-4742-b432-beb0191ad20e
87
---
98
# Compiler Error C2584
109

11-
'Class' : direct base 'Base2' is inaccessible; already a base of 'Base1'
10+
> 'Class' : direct base 'Base2' is inaccessible; already a base of 'Base1'
11+
12+
## Remarks
1213

1314
`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.
1415

1516
## Example
1617

17-
The following sample generates C2584.
18+
The following example generates C2584.
1819

1920
```cpp
2021
// C2584.cpp

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C2585"
32
title: "Compiler Error C2585"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2585"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2585"]
66
helpviewer_keywords: ["C2585"]
7-
ms.assetid: 05bb1a9c-28fb-4a88-a1b5-aea85ebdee1c
87
---
98
# Compiler Error C2585
109

11-
explicit conversion to 'type' is ambiguous
10+
> explicit conversion to 'type' is ambiguous
11+
12+
## Remarks
1213

1314
The type conversion can produce more than one result.
1415

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2586"
32
title: "Compiler Error C2586"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2586"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2586"]
66
helpviewer_keywords: ["C2586"]
7-
ms.assetid: dae703c7-5c38-4db6-8411-4d1b22713eb5
87
---
98
# Compiler Error C2586
109

11-
incorrect user-defined conversion syntax : illegal indirections
10+
> incorrect user-defined conversion syntax : illegal indirections
11+
12+
## Remarks
1213

1314
Indirection of a conversion operator is not allowed.
1415

15-
The following sample generates C2586:
16+
## Example
17+
18+
The following example generates C2586:
1619

1720
```cpp
1821
// c2586.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2587"
32
title: "Compiler Error C2587"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2587"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2587"]
66
helpviewer_keywords: ["C2587"]
7-
ms.assetid: 7637a2c7-35d4-4b5a-a8f2-515a7bda98fd
87
---
98
# Compiler Error C2587
109

11-
'identifier' : illegal use of local variable as default parameter
10+
> 'identifier' : illegal use of local variable as default parameter
11+
12+
## Remarks
1213

1314
Local variables are not allowed as default parameters.
1415

15-
The following sample generates C2587:
16+
## Example
17+
18+
The following example generates C2587:
1619

1720
```cpp
1821
// C2587.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C2588"
32
title: "Compiler Error C2588"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2588"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2588"]
66
helpviewer_keywords: ["C2588"]
7-
ms.assetid: 19a0cabd-ca13-44a5-9be3-ee676abf9bc4
87
---
98
# Compiler Error C2588
109

11-
'::~identifier' : illegal global destructor
10+
> '::~identifier' : illegal global destructor
11+
12+
## Remarks
1213

1314
The destructor is defined for something other than a class, structure, or union. This is not allowed.
1415

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

17-
The following sample generates C2588:
18+
## Example
19+
20+
The following example generates C2588:
1821

1922
```cpp
2023
// C2588.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C2589"
32
title: "Compiler Error C2589"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2589"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2589"]
66
helpviewer_keywords: ["C2589"]
7-
ms.assetid: 1d7942c7-8a81-4bb4-b272-76a0019e8513
87
---
98
# Compiler Error C2589
109

11-
'identifier' : illegal token on right side of '::'
10+
> 'identifier' : illegal token on right side of '::'
11+
12+
## Remarks
1213

1314
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.
1415

1516
The scope-resolution operator cannot be overloaded.
1617

17-
The following sample generates C2589:
18+
## Example
19+
20+
The following example generates C2589:
1821

1922
```cpp
2023
// C2589.cpp
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Error C2592"
32
title: "Compiler Error C2592"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2592"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2592"]
66
helpviewer_keywords: ["C2592"]
7-
ms.assetid: 833a4d7b-66ef-4d4c-ae83-a533c2b0eb07
87
---
98
# Compiler Error C2592
109

11-
'class': 'base_class_2' is inherited from 'base_class_1' and cannot be re-specified
10+
> 'class': 'base_class_2' is inherited from 'base_class_1' and cannot be re-specified
11+
12+
## Remarks
1213

1314
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: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C2593"
32
title: "Compiler Error C2593"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2593"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2593"]
66
helpviewer_keywords: ["C2593"]
7-
ms.assetid: 4a0fe9bb-2163-447d-91f6-1890ed8250f6
87
---
98
# Compiler Error C2593
109

11-
'operator identifier' is ambiguous
10+
> 'operator identifier' is ambiguous
11+
12+
## Remarks
1213

1314
More than one possible operator is defined for an overloaded operator.
1415

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

17-
The following sample generates C2593:
18+
## Examples
19+
20+
The following example generates C2593:
1821

1922
```cpp
2023
// C2593.cpp

0 commit comments

Comments
 (0)