C1XX -nonUDToperators

Syntax

This option has no arguments. It is -nonUDToperators only.

This option is not recognised on the CL command line, but can be passed to C1XX through the CL /d1 option, giving nonUDToperators as its argument.

Behaviour

Most operators can ordinarily be overloaded only if at least one argument, whether formal or implied, has so-called class type. Failure to respect this requirement results in error C2803, as with Microsoft’s example:

int operator + (int, int);      // C2803

The -nonUDToperators option lifts this restriction.

That said, it is not known whether the compiler, with the restriction lifted, then proceeds to generate correct code: undocumented options are sometimes undocumented precisely because they are experimental or unreliable.