Skip to content

Commit 24cb427

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3851, C3890]
1 parent 0e4f92d commit 24cb427

24 files changed

+84
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 194e5c5e-0dfb-414e-86db-791c11eb610c
1010

1111
> 'member' having type 'type': aggregate initialization could not initialize this member
1212
13+
## Remarks
14+
1315
An attempt was made to assign a default initialization as part of an aggregate initialization to a data member that cannot receive a default initialization in an aggregate initialization.
1416

17+
## Example
18+
1519
The following samples generate C3852:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 5b71805d-52b4-44ec-80ae-37c68d876f6a
1010

1111
> '=': re-initializing a reference or assignment through a reference-to-function is illegal
1212
13+
## Remarks
14+
1315
Cannot assign to a reference through a function because functions are not lvalues.
1416

17+
## Example
18+
1519
The following samples generate C3853:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 32a9ead0-c6c7-485a-8802-c7b1fe921d3a
1010

1111
> expression to left of '=' evaluates to a function. Cannot assign to a function (a function is not an l-value)
1212
13+
## Remarks
14+
1315
A reference cannot be reinitialized. Dereferencing a reference to a function yields a function, which is an rvalue, to which you cannot assign. Therefore, you cannot assign through a reference to a function.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: ed90f8c0-4154-4243-b066-493913df5727
1010

1111
> 'class': type parameter 'param' is incompatible with the declaration
1212
13+
## Remarks
14+
1315
The compiler found nontype template or generic parameters with different names. This can occur when a specified template parameter in the definition of a template specialization is incompatible with its declaration.
1416

17+
## Examples
18+
1519
The following sample generates C3855:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 242d9322-c325-4f20-be58-b2be6da56d60
1010

1111
> 'type': class is not a class type
1212
13+
## Remarks
14+
1315
The most common cause for this error is when there are more generic or template parameter lists at the point of definition than there were at the point of declaration.
1416

17+
## Examples
18+
1519
The following sample generates C3856:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 9f746d1e-9708-4945-bc29-3150d5371d3c
1010

1111
> 'type': multiple type parameter lists are not allowed
1212
13+
## Remarks
14+
1315
More than one template or generic was specified for the same type, which is not allowed.
1416

17+
## Examples
18+
1519
The following sample generates C3857:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 46e178d5-a55f-4ac6-a9dc-561fbcba5c1f
1010

1111
> 'type': cannot be redeclared in current scope
1212
13+
## Remarks
14+
1315
The type cannot be declared twice in the same scope.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ The message has one of the following notes:
2525
>PCH: Unable to get the requested block of memory\
2626
>Consider using /Fp to allow the compiler to reserve the memory early
2727
28+
## Remarks
29+
2830
There isn't enough virtual memory allocated for your [precompiled header (PCH)](../../build/creating-precompiled-header-files.md). If your precompiled header uses an explicit `#pragma hdrstop` directive, use the **`/Zm`** compiler flag to specify a larger value for the precompiled header file. Otherwise, consider reducing the number of parallel compilation processes in your build. For more information, see [`/Zm` (Specify precompiled header memory allocation limit)](../../build/reference/zm-specify-precompiled-header-memory-allocation-limit.md).
2931

3032
This diagnostic shows up mostly in two scenarios:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 1fb5110d-594e-4f1c-8773-888233af1313
1010

1111
> type argument list following class type name must list parameters in the order used in type parameter list
1212
13+
## Remarks
14+
1315
A generic or template argument list was ill formed.
1416

17+
## Examples
18+
1519
The following sample generates C3860:
1620

1721
```cpp

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ helpviewer_keywords: ["C3861"]
99

1010
> '*identifier*': identifier not found
1111
12-
The compiler was unable to resolve a reference to an identifier, even using argument-dependent lookup.
13-
1412
## Remarks
1513

14+
The compiler was unable to resolve a reference to an identifier, even using argument-dependent lookup.
15+
1616
To fix this error, compare use of *identifier* to the identifier declaration for case and spelling. Verify that [scope resolution operators](../../cpp/scope-resolution-operator.md) and namespace [`using` directives](../../cpp/namespaces-cpp.md#using_directives) are used correctly. If the identifier is declared in a header file, verify that the header is included before the identifier is referenced. If the identifier is meant to be externally visible, make sure that it's declared in any source file that uses it. Also check that the identifier declaration or definition isn't excluded by [conditional compilation directives](../../preprocessor/hash-if-hash-elif-hash-else-and-hash-endif-directives-c-cpp.md).
1717

1818
Changes to remove obsolete functions from the C Runtime Library in Visual Studio 2015 can cause C3861. To resolve this error, remove references to these functions or replace them with their secure alternatives, if any. For more information, see [Obsolete functions](../../c-runtime-library/obsolete-functions.md).

0 commit comments

Comments
 (0)