E2330 Operator must be declared as function (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

An overloaded operator was declared with something other than function type.

For example:

class A
{
   A& operator +;   ..note missing parenthesis
};

In the example, the function operator '()' is missing, so the operator does not have function type and generates this error.