Namespaces
Variants

Standard library header <iso646.h> (C95)

From cppreference.net

此头文件定义了用于 替代运算符拼写 的宏。

概要

#define and     &&
#define and_eq  &=
#define bitand  &
#define bitor   |
#define compl   ~
#define not     !
#define not_eq  !=
#define or      ||
#define or_eq   |=
#define xor     ^
#define xor_eq  ^=
(注:根据要求,代码块内的C++关键字和运算符均未翻译,仅添加了中文注释说明) 这些是C++的替代记号,用于替代标准逻辑运算符和位运算符: - `and` 替代 `&&`(逻辑与) - `and_eq` 替代 `&=`(按位与赋值) - `bitand` 替代 `&`(按位与) - `bitor` 替代 `|`(按位或) - `compl` 替代 `~`(按位取反) - `not` 替代 `!`(逻辑非) - `not_eq` 替代 `!=`(不等于) - `or` 替代 `||`(逻辑或) - `or_eq` 替代 `|=`(按位或赋值) - `xor` 替代 `^`(按位异或) - `xor_eq` 替代 `^=`(按位异或赋值)

注释

此头文件在C++中无意义,因为这些宏名称在C++中作为关键字存在且无条件可用。