Skip to content

Commit 966b45d

Browse files
Merge pull request MicrosoftDocs#5621 from Rageking8/structure-error-references-in-range-c2701-c2730
Structure error references in range [C2701, C2730]
2 parents 772b4af + 36a0527 commit 966b45d

26 files changed

+144
-99
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2701"
32
title: "Compiler Error C2701"
3+
description: "Learn more about: Compiler Error C2701"
44
ms.date: 09/27/2022
55
f1_keywords: ["C2701"]
66
helpviewer_keywords: ["C2701"]
7-
ms.assetid: 31cf2ab7-ced9-4f75-aa51-e169e20407fb
87
---
98
# Compiler Error C2701
109

1110
> 'function': a function template cannot be a `friend` of a local class
1211
12+
## Remarks
13+
1314
A local class can't have a function template as a `friend` function.
1415

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

1720
```cpp
1821
// C2701.cpp

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ description: "Describes Microsoft C/C++ compiler error C2702."
44
ms.date: 08/25/2020
55
f1_keywords: ["C2702"]
66
helpviewer_keywords: ["C2702"]
7-
ms.assetid: 6def15d4-9a8d-43e7-ae35-42d7cb57c27e
87
---
98
# Compiler Error C2702
109

1110
> `__except` may not appear in termination block
1211
12+
## Remarks
13+
1314
An exception handler (**`__try`**/**`__except`**) cannot be nested inside a **`__finally`** block.
1415

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

1720
```cpp
1821
// C2702.cpp

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: "Describes Microsoft C/C++ compiler error C2703."
44
ms.date: 08/24/2020
55
f1_keywords: ["C2703"]
66
helpviewer_keywords: ["C2703"]
7-
ms.assetid: 384295c3-643d-47ae-a9a6-865b3036aa84
87
---
98
# Compiler Error C2703
109

@@ -16,7 +15,7 @@ A **`__leave`** statement must be inside a **`__try`** block.
1615

1716
## Example
1817

19-
The following sample generates C2703:
18+
The following example generates C2703:
2019

2120
```cpp
2221
// C2703.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 C2704"
32
title: "Compiler Error C2704"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2704"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2704"]
66
helpviewer_keywords: ["C2704"]
7-
ms.assetid: 185797e2-55b5-4c11-8493-e70eb1d15a94
87
---
98
# Compiler Error C2704
109

11-
'identifier' : __va_start intrinsic only allowed in varargs
10+
> 'identifier' : __va_start intrinsic only allowed in varargs
11+
12+
## Remarks
1213

1314
The `__va_start` intrinsic is used in a declaration for a function with a fixed number of arguments.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: "Describes Microsoft C/C++ compiler error C2705."
44
ms.date: 08/25/2020
55
f1_keywords: ["C2705"]
66
helpviewer_keywords: ["C2705"]
7-
ms.assetid: 29249ea3-4ea7-4105-944b-bdb83e8d6852
87
---
98
# Compiler Error C2705
109

@@ -16,7 +15,7 @@ Execution jumps to a label within a **`try`**/**`catch`**, **`__try`**/**`__exce
1615

1716
## Example
1817

19-
The following sample generates C2705:
18+
The following example generates C2705:
2019

2120
```cpp
2221
// C2705.cpp

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ description: "Describes Microsoft C/C++ compiler error C2706."
44
ms.date: 08/25/2020
55
f1_keywords: ["C2706"]
66
helpviewer_keywords: ["C2706"]
7-
ms.assetid: e18da924-c42d-4b09-8e29-f4e0382d7dc6
87
---
98
# Compiler Error C2706
109

1110
> illegal `__except` without matching `__try` (missing '}' in `__try` block?)
1211
12+
## Remarks
13+
1314
The compiler did not find a closing brace for a **`__try`** block.
1415

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

1720
```cpp
1821
// C2706.cpp

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C2707"
32
title: "Compiler Error C2707"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2707"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2707"]
66
helpviewer_keywords: ["C2707"]
7-
ms.assetid: 3deaf45c-74da-4c9d-acc6-b82412720b74
87
---
98
# Compiler Error C2707
109

11-
'identifier' : bad context for intrinsic function
10+
> 'identifier' : bad context for intrinsic function
11+
12+
## Remarks
1213

1314
Structured exception-handling intrinsics are invalid in certain contexts:
1415

@@ -22,7 +23,7 @@ To resolve the error, be sure that the exception-handling intrinsics are placed
2223

2324
## Example
2425

25-
The following sample generates C2707.
26+
The following example generates C2707.
2627

2728
```cpp
2829
// C2707.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2708.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 C2708"
32
title: "Compiler Error C2708"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2708"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2708"]
66
helpviewer_keywords: ["C2708"]
7-
ms.assetid: d52d3088-1141-42f4-829c-74755a7fcc3a
87
---
98
# Compiler Error C2708
109

11-
'identifier' : actual parameters length in bytes differs from previous call or reference
10+
> 'identifier' : actual parameters length in bytes differs from previous call or reference
11+
12+
## Remarks
1213

1314
A [__stdcall](../../cpp/stdcall.md) function must be preceded by a prototype. Otherwise, the compiler interprets the first call to the function as a prototype and this error occurs when the compiler encounters a call that does not match.
1415

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 C2709"
32
title: "Compiler Error C2709"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2709"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2709"]
66
helpviewer_keywords: ["C2709"]
7-
ms.assetid: e66fc7e6-0e91-4b99-a6e0-fdb069b09fbc
87
---
98
# Compiler Error C2709
109

11-
'identifier' : formal parameter's length in bytes differs from previous declaration
10+
> 'identifier' : formal parameter's length in bytes differs from previous declaration
11+
12+
## Remarks
1213

1314
The signature in a call to the specified function differs from the prototype.

docs/error-messages/compiler-errors-2/compiler-error-c2710.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 C2710"
32
title: "Compiler Error C2710"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2710"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2710"]
66
helpviewer_keywords: ["C2710"]
7-
ms.assetid: a2a6bb5b-86ad-4a6c-acd0-e2bef8464e0e
87
---
98
# Compiler Error C2710
109

11-
'construct' : '__declspec(modifier)' can only be applied to a function returning a pointer
10+
> 'construct' : '__declspec(modifier)' can only be applied to a function returning a pointer
11+
12+
## Remarks
1213

1314
A function whose return value is a pointer is the only construct to which `modifier` can be applied.
1415

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

1720
```cpp
1821
// C2710.cpp

0 commit comments

Comments
 (0)