Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 703 Bytes

compiler-error-c2652.md

File metadata and controls

26 lines (22 loc) · 703 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2652
Compiler Error C2652
11/04/2016
C2652
C2652
6e3d1a90-a989-4088-8afd-dc82f6a2d66f

Compiler Error C2652

'identifier' : illegal copy constructor: first parameter must not be an 'identifier'

The first parameter in the copy constructor has the same type as the class, structure, or union for which it is defined. The first parameter can be a reference to the type but not the type itself.

The following sample generates C2651:

// C2652.cpp
// compile with: /c
class A {
   A( A );   // C2652 takes an A
};
class B {
   B( B& );   // OK, reference to B
};