1.^x bitwise complement is m ^ x with m = "all bits set to 1" for unsigned x and m = -1 for signed x
此运算符可用于将标志位取消的操作:
f := 4 f &^= 4 fmt.Println(f) //输出为0
1.^x bitwise complement is m ^ x with m = "all bits set to 1" for unsigned x and m = -1 for signed x
此运算符可用于将标志位取消的操作:
f := 4 f &^= 4 fmt.Println(f) //输出为0