Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 761 Bytes

compiler-warning-level-4-c4610.md

File metadata and controls

37 lines (29 loc) · 761 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4610
Compiler Warning (level 4) C4610
11/04/2016
C4610
C4610
23c1a16c-9ca9-4bf6-9911-a72b785560c2

Compiler Warning (level 4) C4610

object 'class' can never be instantiated - user-defined constructor required

The class has no user-defined or default constructors. No instantiation is performed. The following sample generates C4610:

// C4610.cpp
// compile with: /W4
struct A {
   int &j;

   A& A::operator=( const A& );
};   // C4610

/* use this structure definition to resolve the warning
struct B {
   int &k;

   B(int i = 0) : k(i) {
   }

   B& B::operator=( const B& );
} b;
*/

int main() {
}