Compiler Error C2805

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C2805 on docs.microsoft.com. binary 'operator operator' has too few parameters

The binary operator has no parameters.

The following sample generates C2805:

// C2805.cpp  
// compile with: /c  
class X {  
public:  
   X operator< ( void );   // C2805 must take one parameter  
   X operator< ( X );   // OK  
};  

Show: