Skip to content

Commit 8de18c4

Browse files
authored
Merge pull request #5683 from Rageking8/structure-error-references-in-range-c3481-c3530
Structure error references in range [C3481, C3530]
2 parents 7fc1cc3 + 5a1f15d commit 8de18c4

26 files changed

+147
-115
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3481.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 C3481"
32
title: "Compiler Error C3481"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3481"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3481"]
66
helpviewer_keywords: ["C3481"]
7-
ms.assetid: 5d09375a-5ed3-4b61-86ed-45e91fd734c7
87
---
98
# Compiler Error C3481
109

11-
'var': lambda capture variable not found
10+
> 'var': lambda capture variable not found
11+
12+
## Remarks
1213

1314
The compiler could not find the definition of a variable that you passed to the capture list of a lambda expression.
1415

docs/error-messages/compiler-errors-2/compiler-error-c3482.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 C3482"
32
title: "Compiler Error C3482"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3482"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3482"]
66
helpviewer_keywords: ["C3482"]
7-
ms.assetid: bf99558e-bef4-421c-bb16-dcd9c54c1011
87
---
98
# Compiler Error C3482
109

11-
'this' can only be used as a lambda capture within a non-static member function
10+
> 'this' can only be used as a lambda capture within a non-static member function
11+
12+
## Remarks
1213

1314
You cannot pass **`this`** to the capture list of a lambda expression that is declared in a static method or a global function.
1415

docs/error-messages/compiler-errors-2/compiler-error-c3483.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 C3483"
32
title: "Compiler Error C3483"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3483"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3483"]
66
helpviewer_keywords: ["C3483"]
7-
ms.assetid: 18b3a2c5-dfc9-4661-9653-08a5798474cf
87
---
98
# Compiler Error C3483
109

11-
'var' is already part of the lambda capture list
10+
> 'var' is already part of the lambda capture list
11+
12+
## Remarks
1213

1314
You passed the same variable to the capture list of a lambda expression more than one time.
1415

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C3484"
32
title: "Compiler Error C3484"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3484"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3484"]
66
helpviewer_keywords: ["C3484"]
7-
ms.assetid: 2fe847fa-f6ee-4978-bc1d-b6dc6ae906ac
87
---
98
# Compiler Error C3484
109

11-
expected '->' before the return type
10+
> expected '->' before the return type
11+
12+
## Remarks
1213

1314
You must provide `->` before the return type of a lambda expression.
1415

1516
### To correct this error
1617

1718
- Provide `->` before the return type.
1819

19-
## Examples
20+
## Example
2021

2122
The following example generates C3484:
2223

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C3485"
32
title: "Compiler Error C3485"
3+
description: "Learn more about: Compiler Error C3485"
44
ms.date: 06/01/2022
55
f1_keywords: ["C3485"]
66
helpviewer_keywords: ["C3485"]
7-
ms.assetid: d67536f9-67a1-4ad9-9a94-d8bbbca3d0dc
87
---
98
# Compiler Error C3485
109

docs/error-messages/compiler-errors-2/compiler-error-c3487.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 C3487"
32
title: "Compiler Error C3487"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3487"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3487"]
66
helpviewer_keywords: ["C3487"]
7-
ms.assetid: 39bda474-4418-4a79-98bf-2b22fa92eaaa
87
---
98
# Compiler Error C3487
109

11-
'return type': all return expressions must deduce to the same type: previously it was 'return type'
10+
> 'return type': all return expressions must deduce to the same type: previously it was 'return type'
11+
12+
## Remarks
1213

1314
A lambda must specify its return type unless it contains a single return statement. If a lambda contains multiple return statements, they must all have the same type.
1415

docs/error-messages/compiler-errors-2/compiler-error-c3488.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 C3488"
32
title: "Compiler Error C3488"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3488"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3488"]
66
helpviewer_keywords: ["C3488"]
7-
ms.assetid: 0a6fcd76-dd3b-48d7-abb3-22eccda96034
87
---
98
# Compiler Error C3488
109

11-
'var' is not allowed when the default capture mode is by-reference
10+
> 'var' is not allowed when the default capture mode is by-reference
11+
12+
## Remarks
1213

1314
When you specify that the default capture mode for a lambda expression is by-reference, you cannot pass a variable by reference to the capture clause of that expression.
1415

@@ -22,7 +23,7 @@ When you specify that the default capture mode for a lambda expression is by-ref
2223

2324
- Pass the variable by value to the capture clause. (This might change the behavior of the lambda expression.)
2425

25-
## Examples
26+
## Example
2627

2728
The following example generates C3488 because a reference to the variable `n` appears in the capture clause of a lambda expression whose default mode is by-reference:
2829

docs/error-messages/compiler-errors-2/compiler-error-c3489.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 C3489"
32
title: "Compiler Error C3489"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3489"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3489"]
66
helpviewer_keywords: ["C3489"]
7-
ms.assetid: 47b58d69-459d-4499-abc7-5f0b9303d773
87
---
98
# Compiler Error C3489
109

11-
'var' is required when the default capture mode is by-value
10+
> 'var' is required when the default capture mode is by-value
11+
12+
## Remarks
1213

1314
When you specify that the default capture mode for a lambda expression is by-value, you cannot pass a variable by value to the capture clause of that expression.
1415

@@ -22,7 +23,7 @@ When you specify that the default capture mode for a lambda expression is by-val
2223

2324
- Pass the variable by reference to the capture clause. (This might change the behavior of the lambda expression.)
2425

25-
## Examples
26+
## Example
2627

2728
The following example generates C3489 variable `n` appears by value in the capture clause of a lambda expression whose default mode is by-value:
2829

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C3490"
32
title: "Compiler Error C3490"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3490"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3490"]
66
helpviewer_keywords: ["C3490"]
7-
ms.assetid: 7638559a-fd06-4527-a9c1-0c8ae68b3123
87
---
98
# Compiler Error C3490
109

11-
'var' cannot be modified because it is being accessed through a const object
10+
> 'var' cannot be modified because it is being accessed through a const object
11+
12+
## Remarks
1213

1314
A lambda expression that is declared in a **`const`** method cannot modify non-mutable member data.
1415

1516
### To correct this error
1617

1718
- Remove the **`const`** modifier from your method declaration.
1819

19-
## Examples
20+
## Example
2021

2122
The following example generates C3490 because it modifies the member variable `_i` in a **`const`** method:
2223

docs/error-messages/compiler-errors-2/compiler-error-c3491.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 C3491"
32
title: "Compiler Error C3491"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3491"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3491"]
66
helpviewer_keywords: ["C3491"]
7-
ms.assetid: 7f0e71b2-46a0-4d25-bd09-6158a280f509
87
---
98
# Compiler Error C3491
109

11-
'var': a by-value capture cannot be modified in a non-mutable lambda
10+
> 'var': a by-value capture cannot be modified in a non-mutable lambda
11+
12+
## Remarks
1213

1314
A non-mutable lambda expression cannot modify the value of a variable that is captured by value.
1415

@@ -18,7 +19,7 @@ A non-mutable lambda expression cannot modify the value of a variable that is ca
1819

1920
- Pass the variable by reference to the capture list of the lambda expression.
2021

21-
## Examples
22+
## Example
2223

2324
The following example generates C3491 because the body of a non-mutable lambda expression modifies the capture variable `m`:
2425

0 commit comments

Comments
 (0)