NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2831

'operator operator' cannot have default parameters

Only three operators can have default parameters:

The following sample generates C2831:

#define BINOP <=
class A {
   public:
      int i;
      int operator BINOP(int x = 1) {   // C2831
      // use the line below to resolve the error
      // int operator BINOP(int x) {
         return i+x;
      };
};

main() {
}