Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/error-messages/compiler-errors-2/compiler-error-c3851.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Error C3851"
title: "Compiler Error C3851"
ms.date: "09/05/2018"
description: "Learn more about: Compiler Error C3851"
ms.date: 09/05/2018
f1_keywords: ["C3851"]
helpviewer_keywords: ["C3851"]
ms.assetid: da30c21c-33aa-4439-8fb3-2f5021ea4985
---
# Compiler Error C3851

Expand All @@ -16,7 +15,7 @@ In code compiled as C++, you cannot use a universal character name that represen

## Example

The following samples generate C3851, and show how to fix it:
The following example generate C3851, and show how to fix it:

```cpp
// C3851.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3852.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3852"
title: "Compiler Error C3852"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3852"
ms.date: 11/04/2016
f1_keywords: ["C3852"]
helpviewer_keywords: ["C3852"]
ms.assetid: 194e5c5e-0dfb-414e-86db-791c11eb610c
---
# Compiler Error C3852

'member' having type 'type': aggregate initialization could not initialize this member
> 'member' having type 'type': aggregate initialization could not initialize this member

## Remarks

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.

The following samples generate C3852:
## Example

The following example generate C3852:

```cpp
// C3852.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3853.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3853"
title: "Compiler Error C3853"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3853"
ms.date: 11/04/2016
f1_keywords: ["C3853"]
helpviewer_keywords: ["C3853"]
ms.assetid: 5b71805d-52b4-44ec-80ae-37c68d876f6a
---
# Compiler Error C3853

'=': re-initializing a reference or assignment through a reference-to-function is illegal
> '=': re-initializing a reference or assignment through a reference-to-function is illegal

## Remarks

Cannot assign to a reference through a function because functions are not lvalues.

The following samples generate C3853:
## Example

The following example generate C3853:

```cpp
// C3853.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3854.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3854"
title: "Compiler Error C3854"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3854"
ms.date: 11/04/2016
f1_keywords: ["C3854"]
helpviewer_keywords: ["C3854"]
ms.assetid: 32a9ead0-c6c7-485a-8802-c7b1fe921d3a
---
# Compiler Error C3854

expression to left of '=' evaluates to a function. Cannot assign to a function (a function is not an l-value)
> expression to left of '=' evaluates to a function. Cannot assign to a function (a function is not an l-value)

## Remarks

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.

The following sample generates C3854:
## Example

The following example generates C3854:

```cpp
// C3854.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3855.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3855"
title: "Compiler Error C3855"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3855"
ms.date: 11/04/2016
f1_keywords: ["C3855"]
helpviewer_keywords: ["C3855"]
ms.assetid: ed90f8c0-4154-4243-b066-493913df5727
---
# Compiler Error C3855

'class': type parameter 'param' is incompatible with the declaration
> 'class': type parameter 'param' is incompatible with the declaration

## Remarks

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.

The following sample generates C3855:
## Examples

The following example generates C3855:

```cpp
// C3855.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3856.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3856"
title: "Compiler Error C3856"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3856"
ms.date: 11/04/2016
f1_keywords: ["C3856"]
helpviewer_keywords: ["C3856"]
ms.assetid: 242d9322-c325-4f20-be58-b2be6da56d60
---
# Compiler Error C3856

'type': class is not a class type
> 'type': class is not a class type

## Remarks

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.

The following sample generates C3856:
## Examples

The following example generates C3856:

```cpp
// C3856.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3857.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3857"
title: "Compiler Error C3857"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3857"
ms.date: 11/04/2016
f1_keywords: ["C3857"]
helpviewer_keywords: ["C3857"]
ms.assetid: 9f746d1e-9708-4945-bc29-3150d5371d3c
---
# Compiler Error C3857

'type': multiple type parameter lists are not allowed
> 'type': multiple type parameter lists are not allowed

## Remarks

More than one template or generic was specified for the same type, which is not allowed.

The following sample generates C3857:
## Examples

The following example generates C3857:

```cpp
// C3857.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3858.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3858"
title: "Compiler Error C3858"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3858"
ms.date: 11/04/2016
f1_keywords: ["C3858"]
helpviewer_keywords: ["C3858"]
ms.assetid: 46e178d5-a55f-4ac6-a9dc-561fbcba5c1f
---
# Compiler Error C3858

'type': cannot be redeclared in current scope
> 'type': cannot be redeclared in current scope

## Remarks

The type cannot be declared twice in the same scope.

The following sample generates C3858:
## Example

The following example generates C3858:

```cpp
// C3858.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Learn more about: Compiler Error C3859"
title: "Compiler Error C3859"
description: "Learn more about: Compiler Error C3859"
ms.date: 02/22/2022
f1_keywords: ["C3859"]
helpviewer_keywords: ["C3859"]
Expand All @@ -25,6 +25,8 @@ The message has one of the following notes:
>PCH: Unable to get the requested block of memory\
>Consider using /Fp to allow the compiler to reserve the memory early

## Remarks

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).

This diagnostic shows up mostly in two scenarios:
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3860.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3860"
title: "Compiler Error C3860"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3860"
ms.date: 11/04/2016
f1_keywords: ["C3860"]
helpviewer_keywords: ["C3860"]
ms.assetid: 1fb5110d-594e-4f1c-8773-888233af1313
---
# Compiler Error C3860

type argument list following class type name must list parameters in the order used in type parameter list
> type argument list following class type name must list parameters in the order used in type parameter list

## Remarks

A generic or template argument list was ill formed.

The following sample generates C3860:
## Examples

The following example generates C3860:

```cpp
// C3860.cpp
Expand Down
10 changes: 5 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3861.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ helpviewer_keywords: ["C3861"]

> '*identifier*': identifier not found

The compiler was unable to resolve a reference to an identifier, even using argument-dependent lookup.

## Remarks

The compiler was unable to resolve a reference to an identifier, even using argument-dependent lookup.

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).

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).
Expand All @@ -23,7 +23,7 @@ If error C3861 appears after project migration from older versions of the compil

### Undefined identifier

The following sample generates C3861 because the identifier isn't defined.
The following example generates C3861 because the identifier isn't defined.

```cpp
// C3861.cpp
Expand All @@ -36,7 +36,7 @@ int main() {

### Identifier not in scope

The following sample generates C3861, because an identifier is only visible in the file scope of its definition, unless it's declared in other source files that use it.
The following example generates C3861, because an identifier is only visible in the file scope of its definition, unless it's declared in other source files that use it.

Source file `C3861_a1.cpp`:

Expand Down Expand Up @@ -97,7 +97,7 @@ int main() {

### ADL and friend functions

The following sample generates C3861 because the compiler can't use argument dependent lookup for `FriendFunc`:
The following example generates C3861 because the compiler can't use argument dependent lookup for `FriendFunc`:

```cpp
namespace N {
Expand Down
7 changes: 3 additions & 4 deletions docs/error-messages/compiler-errors-2/compiler-error-c3862.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Error C3862"
title: "Compiler Error C3862"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3862"
ms.date: 11/04/2016
f1_keywords: ["C3862"]
helpviewer_keywords: ["C3862"]
ms.assetid: ba547366-4189-4077-8c00-ab45e08a9533
---
# Compiler Error C3862

Expand All @@ -20,7 +19,7 @@ For more information, see [/clr (Common Language Runtime Compilation)](../../bui

## Example

The following sample generates C3862:
The following example generates C3862:

```cpp
// C3862.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3865.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
description: "Learn more about: Compiler Error C3865"
title: "Compiler Error C3865"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3865"
ms.date: 11/04/2016
f1_keywords: ["C3865"]
helpviewer_keywords: ["C3865"]
ms.assetid: 9bc62bb0-4fb8-4856-a5cf-c7cb4029a596
---
# Compiler Error C3865

'calling_convention' : can only be used on native member functions
> 'calling_convention' : can only be used on native member functions

## Remarks

A calling convention was used on a function that was either a global function or on a managed member function. The calling convention can only be used on a native (not managed) member function.

For more information, see [Calling Conventions](../../cpp/calling-conventions.md).

The following sample generates C3865:
## Example

The following example generates C3865:

```cpp
// C3865.cpp
Expand Down
13 changes: 8 additions & 5 deletions docs/error-messages/compiler-errors-2/compiler-error-c3866.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Error C3866"
title: "Compiler Error C3866"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Error C3866"
ms.date: 11/04/2016
f1_keywords: ["C3866"]
helpviewer_keywords: ["C3866"]
ms.assetid: 685870af-2440-4cdf-a6cb-284a5b96ef9d
---
# Compiler Error C3866

function call missing argument list
> function call missing argument list

## Remarks

Inside a nonstatic member function, a destructor or finalizer call did not have an argument list.

The following sample generates C3866:
## Example

The following example generates C3866:

```cpp
// C3866.cpp
Expand Down
Loading