另外提醒一点,如果想跟踪除了某个组件之外的所有组件,还可以使用另一个位操作符。
Just a side note, there is also a bitwise operator you can use if you want to trace everything except a certain component.
如果想跟踪不止一个特定的tracelevel属性,那么可以使用位操作符(|)来分隔不同的属性。
If you want to trace more than one specific traceLevel property, then you can use bitwise operator (|) to separate the different properties.
对称的操作符,如算术操作符、相等操作符、关系操作符和位操作符,最好定义为普通非成员函数。
Symmetric operators, such as the arithmetic, equality, relational, and bitwise operators, are best defined as ordinary nonmember functions.
应用推荐