Skip to content

Commit e15e16d

Browse files
authored
Merge pull request #5566 from Rageking8/structure-error-references-in-range-c2261-c2290
Structure error references in range [C2261, C2290]
2 parents a4ad799 + d79e4b1 commit e15e16d

22 files changed

+152
-102
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2261.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 C2261"
32
title: "Compiler Error C2261"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2261"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2261"]
66
helpviewer_keywords: ["C2261"]
7-
ms.assetid: 60969482-9e83-49b5-9631-a04bc844da12
87
---
98
# Compiler Error C2261
109

11-
'string' : assembly reference is invalid and cannot be resolved
10+
> 'string' : assembly reference is invalid and cannot be resolved
11+
12+
## Remarks
1213

1314
A value was not valid.
1415

@@ -18,7 +19,7 @@ For more on the correct syntax when specifying friend assemblies, see [Friend As
1819

1920
## Example
2021

21-
The following sample generates C2261.
22+
The following example generates C2261.
2223

2324
```cpp
2425
// C2261.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2262.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 C2262"
32
title: "Compiler Error C2262"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2262"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2262"]
66
helpviewer_keywords: ["C2262"]
7-
ms.assetid: 727d1c6e-53e8-40e5-b7b8-6a7ac2011727
87
---
98
# Compiler Error C2262
109

11-
'attribute_specifiers' : InternalsVisibleTo declarations cannot have a version, culture, or processor architecture specified
10+
> 'attribute_specifiers' : InternalsVisibleTo declarations cannot have a version, culture, or processor architecture specified
11+
12+
## Remarks
1213

1314
The <xref:System.Runtime.CompilerServices.InternalsVisibleToAttribute> attribute was not specified correctly.
1415

1516
## Example
1617

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

1920
```cpp
2021
// C2262.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2264.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 C2264"
32
title: "Compiler Error C2264"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2264"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2264"]
66
helpviewer_keywords: ["C2264"]
7-
ms.assetid: 158b72cc-cee9-4a08-bd79-b7a5955345a8
87
---
98
# Compiler Error C2264
109

11-
'function' : error in function definition or declaration; function not called
10+
> 'function' : error in function definition or declaration; function not called
11+
12+
## Remarks
1213

1314
The function cannot be called due to an incorrect definition or declaration.
1415

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

1720
```cpp
1821
// C2264.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 C2266"
32
title: "Compiler Error C2266"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2266"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2266"]
66
helpviewer_keywords: ["C2266"]
7-
ms.assetid: 5c267a67-d5a1-4ad7-b6f7-a156510aee35
87
---
98
# Compiler Error C2266
109

11-
'identifier' : reference to a non-constant bounded array is illegal
10+
> 'identifier' : reference to a non-constant bounded array is illegal
11+
12+
## Remarks
1213

1314
A reference is declared for an array with a nonconstant bound. The array must have constant bounds.

docs/error-messages/compiler-errors-1/compiler-error-c2267.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 C2267"
32
title: "Compiler Error C2267"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2267"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2267"]
66
helpviewer_keywords: ["C2267"]
7-
ms.assetid: ea63bebb-6208-4367-8440-39be07f9c360
87
---
98
# Compiler Error C2267
109

11-
'function' : static functions with block scope are illegal
10+
> 'function' : static functions with block scope are illegal
11+
12+
## Remarks
1213

1314
A local function is declared **`static`**. Static functions must have global scope.
1415

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

1720
```cpp
1821
// C2267.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2268.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 C2268"
32
title: "Compiler Error C2268"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2268"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2268"]
66
helpviewer_keywords: ["C2268"]
7-
ms.assetid: 0ed055c9-3c6f-4df2-a5b6-85cf0e01a249
87
---
98
# Compiler Error C2268
109

11-
'function' is a compiler predefined library helper. Library helpers are not supported with /GL; compile object file 'file' without /GL.
10+
> 'function' is a compiler predefined library helper. Library helpers are not supported with /GL; compile object file 'file' without /GL.
11+
12+
## Remarks
1213

1314
A function defined in your source code has the same name as an internal compiler function. Compile the module containing the function without [/GL](../../build/reference/gl-whole-program-optimization.md).
1415

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

1720
```c
1821
// C2268.c

docs/error-messages/compiler-errors-1/compiler-error-c2270.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 C2270"
32
title: "Compiler Error C2270"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2270"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2270"]
66
helpviewer_keywords: ["C2270"]
7-
ms.assetid: b52c068e-0b61-42e7-b775-4d57b3ddcba0
87
---
98
# Compiler Error C2270
109

11-
'function' : modifiers not allowed on nonmember functions
10+
> 'function' : modifiers not allowed on nonmember functions
11+
12+
## Remarks
1213

1314
A nonmember function is declared with [const](../../cpp/const-cpp.md), [volatile](../../cpp/volatile-cpp.md), or another memory-model modifier.
1415

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

1720
```cpp
1821
// C2270.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2271.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 C2271"
32
title: "Compiler Error C2271"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2271"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2271"]
66
helpviewer_keywords: ["C2271"]
7-
ms.assetid: ea47bf57-f55d-4171-8e98-95a71d62820e
87
---
98
# Compiler Error C2271
109

11-
'operator' : new/delete cannot have formal list modifiers
10+
> 'operator' : new/delete cannot have formal list modifiers
11+
12+
## Remarks
1213

1314
The operator (**`new`** or **`delete`**) is declared with a memory-model specifier.
1415

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

1720
```cpp
1821
// C2271.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2272.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 C2272"
32
title: "Compiler Error C2272"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2272"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2272"]
66
helpviewer_keywords: ["C2272"]
7-
ms.assetid: 1517706a-9c27-452e-9b10-3424b3d232bc
87
---
98
# Compiler Error C2272
109

11-
'function' : modifiers not allowed on static member functions
10+
> 'function' : modifiers not allowed on static member functions
11+
12+
## Remarks
1213

1314
A **`static`** member function is declared with a memory-model specifier, such as [const](../../cpp/const-cpp.md) or [volatile](../../cpp/volatile-cpp.md), and such modifiers are not allowed on **`static`** member functions.
1415

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

1720
```cpp
1821
// C2272.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2273.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 C2273"
32
title: "Compiler Error C2273"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2273"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2273"]
66
helpviewer_keywords: ["C2273"]
7-
ms.assetid: 3c682c66-97bf-4a23-a22c-d9a26a92bf95
87
---
98
# Compiler Error C2273
109

11-
'type' : illegal as right side of '->' operator
10+
> 'type' : illegal as right side of '->' operator
11+
12+
## Remarks
1213

1314
A type appears as the right operand of a `->` operator.
1415

1516
This error can be caused by trying to access a user-defined type conversion. Use the keyword **`operator`** between -> and `type`.
1617

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

1922
```cpp
2023
// C2273.cpp

0 commit comments

Comments
 (0)