Skip to content

Commit 8cc9edd

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2761, C2790]
1 parent ba99027 commit 8cc9edd

25 files changed

+90
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 38c79a05-b56d-485b-820f-95e8c0cb926f
1010

1111
> 'function' : member function redeclaration not allowed
1212
13+
## Remarks
14+
1315
You cannot redeclare a member function. You can define it, but not redeclare it.
1416

1517
## Examples

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 8b81a801-fd48-40a1-8bee-0748795b12e4
1010

1111
> 'class' : invalid expression as a template argument for 'argument'
1212
13+
## Remarks
14+
1315
When using [/Za](../../build/reference/za-ze-disable-language-extensions.md), the compiler will not convert an integral to a pointer.
1416

17+
## Example
18+
1519
The following sample generates C2762:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3754f5af-e094-4425-be20-d0c9a9b5baec
1010

1111
> 'param' : template parameter not used or deducible in partial specialization 'specialization'
1212
13+
## Remarks
14+
1315
A template parameter is not used in a partial specialization. This makes the partial specialization unusable because the template parameter cannot be deduced.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ helpviewer_keywords: ["C2765"]
99

1010
> 'function' : an explicit specialization of a function template cannot have any default arguments
1111
12+
## Remarks
13+
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

16+
## Example
17+
1418
The following sample generates C2765:
1519

1620
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 8032f4ca-6827-4f04-9c61-c44643c85cc4
1010

1111
> explicit specialization; 'specialization' has already been defined
1212
13+
## Remarks
14+
1315
Duplicate explicit specializations are not allowed. For more information, see [Explicit Specialization of Function Templates](../../cpp/explicit-specialization-of-function-templates.md).
1416

17+
## Example
18+
1519
The following sample generates C2766:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: e8f84178-a160-4d71-a236-07e4fcc11e96
1010

1111
> managed or WinRTarray dimension mismatch : expected N argument(s) - M provided
1212
13+
## Remarks
14+
1315
A managed or WinRT array declaration was ill formed. For more information, see [array](../../extensions/arrays-cpp-component-extensions.md).
1416

17+
## Example
18+
1519
The following sample generates C2767 and shows how to fix it:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 100001b5-80b0-4971-8ff6-9023f443c926
1010

1111
> invalid explicit template_or_generic argument(s) for 'template'
1212
13+
## Remarks
14+
1315
Function template candidates with explicit template or generic arguments resulted in disallowed function types.
1416

17+
## Example
18+
1519
The following sample generates C2770:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: b649cc9f-7cbc-4b42-a5e8-51dad5c55e4b
1010

1111
> #import only permitted at global or namespace scope
1212
13+
## Remarks
14+
1315
The `#import` directive is not allowed in, for example, a function or structure.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 8d564b26-1623-4d92-aabc-dff33f7b1145
1010

1111
> #import and #using available only in C++ compiler
1212
13+
## Remarks
14+
1315
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.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 10f428c6-7f49-489a-92ba-6ef978b7caaf
1010

1111
> 'identifier' : no 'put' method is associated with this property
1212
13+
## Remarks
14+
1315
A data member declared with [property](../../cpp/property-cpp.md) has no `put` function, but an expression tries to set its value.
1416

17+
## Example
18+
1519
The following sample generates C2774:
1620

1721
```cpp

0 commit comments

Comments
 (0)