一元算術運算子

一元+和 - 運算子僅可用於算術型別,因此,例如,如果嘗試在結構上使用它們,程式將生成診斷,例如:

struct foo
{
    bool bar;
};

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