Unary arithmetic operators

suggest change

The unary \+ and \- operators are only usable on arithmetic types, therefore if for example one tries to use them on a struct the program will produce a diagnostic eg:

struct foo
{
    bool bar;
};

void baz(void)
{
   struct foo testStruct;
   -testStruct; /* This breaks the constraint so must produce a diagnostic */
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents