且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

按位常数和概念常数之间的区别?

更新时间:2023-01-13 16:13:24

这里有一些(演员/可变)示例:

按位const意味着对象中的每个位都是永久的,因此对象的位图将永远不会改变。逻辑const意味着,虽然整个对象在概念上是不变的,但逐个成员可能会有变化 [ ^ ] :))
There are some (cast/mutable) examples here:
Bitwise const means that every bit in the object is permanent, so a bit image of the object will never change. Logical const means that, although the entire object is conceptually constant, there may be changes on a member-by-member basis[^] :)