Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 868 Bytes

compiler-warning-level-1-c4674.md

File metadata and controls

27 lines (22 loc) · 868 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4674
Compiler Warning (level 1) C4674
11/04/2016
C4674
C4674
638dae0b-b82c-4865-9599-72630827ca09

Compiler Warning (level 1) C4674

'method' should be declared 'static' and have exactly one parameter

The signature of a conversion operator was not correct. The method is not considered a user-defined conversion. For more information on defining operators, see User-Defined Operators (C++/CLI) and User-Defined Conversions (C++/CLI).

Example

The following sample generates C4674.

// C4674.cpp
// compile with: /clr /WX /W1 /LD
ref class G {
   int op_Implicit(int i) {   // C4674
      return 0;
   }
};