假设代码片段
bool a; a = true; a |= mayRun(); a = false; a |= mayRun();
在哪种情况下mayRun()被执行?
所有解释都告诉我,这 a |= b; 相当于 a = a | b;
a |= b;
a = a | b;
但它不能与示例arr[i++] |= b; 所示相同 .
arr[i++] |= b;
c++ compiler-construction compound-assignment
c++ ×1
compiler-construction ×1
compound-assignment ×1