为什么 C++ 需要运算符同义词?

Why does C++ need operator synonyms?

在维基百科上查找C++的运算符列表时,我发现了一篇关于operator synonyms的文章:

C++ defines[6] keywords to act as aliases for a number of operators: and (&&), bitand (&), and_eq (&=), or (||), bitor (|), or_eq (|=), xor (^), xor_eq (^=), not (!), not_eq (!=), and compl (~). These can be used exactly the same way as the punctuation symbols they replace, as they are not the same operator under a different name, but rather simple token replacements for the name (character string) of the respective operator. This means that the expressions (a > 0 and flag) and (a > 0 && flag) have identical meanings. It also mean that, for example, the bitand keyword may be used to replace not only the bitwise-and operator but also the address-of operator, and it can even be used to specify reference types (e.g., int bitand ref = n). The ISO C specification makes allowance for these keywords as preprocessor macros in the header file iso646.h. For compatibility with C, C++ provides the header ciso646, inclusion of which has no effect.

然后我想知道:为什么我们需要这些operator synonyms?如果有人提供一些用例,那就太好了。

所有答案都在这里: http://en.cppreference.com/w/cpp/language/operator_alternative

基本上,这些是无法在 ISO 646 字符代码集中表示的符号。