C2024: Overloaded operators cannot have default arguments

[ERROR]

Description

An overloaded operator was specified with default arguments.

Example
   struct A{

  
   // ...

  
   };

  
  operator + (A a, int i=0);  // error

  
Tips

Overloaded operators cannot have default arguments. Declare several versions of the operator with different numbers of arguments.

See also