Skip to content

Commit 528604b

Browse files
Merge pull request MicrosoftDocs#5631 from Rageking8/structure-error-references-in-range-c2761-c2790
Structure error references in range [C2761, C2790]
2 parents af5fddb + b2cff3c commit 528604b

26 files changed

+190
-125
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2761"
32
title: "Compiler Error C2761"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2761"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2761"]
66
helpviewer_keywords: ["C2761"]
7-
ms.assetid: 38c79a05-b56d-485b-820f-95e8c0cb926f
87
---
98
# Compiler Error C2761
109

11-
'function' : member function redeclaration not allowed
10+
> 'function' : member function redeclaration not allowed
11+
12+
## Remarks
1213

1314
You cannot redeclare a member function. You can define it, but not redeclare it.
1415

1516
## Examples
1617

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

1920
```cpp
2021
// C2761.cpp
@@ -27,7 +28,7 @@ void a::a; // C2761
2728
void a::test; // C2761
2829
```
2930
30-
Nonstatic members of a class or structure cannot be defined. The following sample generates C2761.
31+
Nonstatic members of a class or structure cannot be defined. The following example generates C2761.
3132
3233
```cpp
3334
// C2761_b.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2762.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 C2762"
32
title: "Compiler Error C2762"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2762"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2762"]
66
helpviewer_keywords: ["C2762"]
7-
ms.assetid: 8b81a801-fd48-40a1-8bee-0748795b12e4
87
---
98
# Compiler Error C2762
109

11-
'class' : invalid expression as a template argument for 'argument'
10+
> 'class' : invalid expression as a template argument for 'argument'
11+
12+
## Remarks
1213

1314
When using [/Za](../../build/reference/za-ze-disable-language-extensions.md), the compiler will not convert an integral to a pointer.
1415

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

1720
```cpp
1821
// C2762.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2764.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 C2764"
32
title: "Compiler Error C2764"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2764"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2764"]
66
helpviewer_keywords: ["C2764"]
7-
ms.assetid: 3754f5af-e094-4425-be20-d0c9a9b5baec
87
---
98
# Compiler Error C2764
109

11-
'param' : template parameter not used or deducible in partial specialization 'specialization'
10+
> 'param' : template parameter not used or deducible in partial specialization 'specialization'
11+
12+
## Remarks
1213

1314
A template parameter is not used in a partial specialization. This makes the partial specialization unusable because the template parameter cannot be deduced.
1415

1516
## Example
1617

17-
The following sample generates C2764:
18+
The following example generates C2764:
1819

1920
```cpp
2021
// C2764.cpp

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ helpviewer_keywords: ["C2765"]
77
---
88
# Compiler Error C2765
99

10-
'function' : an explicit specialization of a function template cannot have any default arguments
10+
> 'function' : an explicit specialization of a function template cannot have any default arguments
11+
12+
## Remarks
1113

1214
Default arguments are not allowed on an explicit specialization of a function template. For more information, see [Explicit Specialization of Function Templates](../../cpp/explicit-specialization-of-function-templates.md).
1315

14-
The following sample generates C2765:
16+
## Example
17+
18+
The following example generates C2765:
1519

1620
```cpp
1721
// C2765.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2766.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 C2766"
32
title: "Compiler Error C2766"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2766"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2766"]
66
helpviewer_keywords: ["C2766"]
7-
ms.assetid: 8032f4ca-6827-4f04-9c61-c44643c85cc4
87
---
98
# Compiler Error C2766
109

11-
explicit specialization; 'specialization' has already been defined
10+
> explicit specialization; 'specialization' has already been defined
11+
12+
## Remarks
1213

1314
Duplicate explicit specializations are not allowed. For more information, see [Explicit Specialization of Function Templates](../../cpp/explicit-specialization-of-function-templates.md).
1415

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

1720
```cpp
1821
// C2766.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2767.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 C2767"
32
title: "Compiler Error C2767"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2767"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2767"]
66
helpviewer_keywords: ["C2767"]
7-
ms.assetid: e8f84178-a160-4d71-a236-07e4fcc11e96
87
---
98
# Compiler Error C2767
109

11-
managed or WinRTarray dimension mismatch : expected N argument(s) - M provided
10+
> managed or WinRTarray dimension mismatch : expected N argument(s) - M provided
11+
12+
## Remarks
1213

1314
A managed or WinRT array declaration was ill formed. For more information, see [array](../../extensions/arrays-cpp-component-extensions.md).
1415

15-
The following sample generates C2767 and shows how to fix it:
16+
## Example
17+
18+
The following example generates C2767 and shows how to fix it:
1619

1720
```cpp
1821
// C2767.cpp

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C2768"
32
title: "Compiler Error C2768"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2768"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2768"]
66
helpviewer_keywords: ["C2768"]
7-
ms.assetid: a7f6047a-6a80-4737-ad5c-c12868639fb5
87
---
98
# Compiler Error C2768
109

@@ -18,7 +17,7 @@ This error was introduced in Visual Studio .NET 2003, as part of the compiler co
1817

1918
## Example
2019

21-
The following sample generates C2768:
20+
The following example generates C2768:
2221

2322
```cpp
2423
// C2768.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2770.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 C2770"
32
title: "Compiler Error C2770"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2770"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2770"]
66
helpviewer_keywords: ["C2770"]
7-
ms.assetid: 100001b5-80b0-4971-8ff6-9023f443c926
87
---
98
# Compiler Error C2770
109

11-
invalid explicit template_or_generic argument(s) for 'template'
10+
> invalid explicit template_or_generic argument(s) for 'template'
11+
12+
## Remarks
1213

1314
Function template candidates with explicit template or generic arguments resulted in disallowed function types.
1415

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

1720
```cpp
1821
// C2770.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 C2771"
32
title: "Compiler Error C2771"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2771"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2771"]
66
helpviewer_keywords: ["C2771"]
7-
ms.assetid: b649cc9f-7cbc-4b42-a5e8-51dad5c55e4b
87
---
98
# Compiler Error C2771
109

11-
\#import only permitted at global or namespace scope
10+
> #import only permitted at global or namespace scope
11+
12+
## Remarks
1213

1314
The `#import` directive is not allowed in, for example, a function or structure.
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 C2773"
32
title: "Compiler Error C2773"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2773"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2773"]
66
helpviewer_keywords: ["C2773"]
7-
ms.assetid: 8d564b26-1623-4d92-aabc-dff33f7b1145
87
---
98
# Compiler Error C2773
109

11-
\#import and #using available only in C++ compiler
10+
> #import and #using available only in C++ compiler
11+
12+
## Remarks
1213

1314
The C compiler does not recognize the `#import` preprocessor directive. Compile the source as C++. Use [/TP](../../build/reference/tc-tp-tc-tp-specify-source-file-type.md) if necessary.

0 commit comments

Comments
 (0)