If the expression can be verified as a constant, then a constant expression (which is available for optimization) is used.
如果发现表达式是常量,那么就使用可以优化的常量表达式。
Extract constant is similar to Extract Local Variable, but you must select a static, constant expression, which the refactoring will convert to a static final constant.
ExtractConstant与ExtractLocalVariable相似,但是您必须选择静态常量表达式,重构工具将会把它转换成静态的final常量。
Why using constant expression as a template parameter?
为什么使用常数表达式作为一个模板参数?
The address of a thread local object is not considered constant, and any expression involving such an address is not considered a constant expression.
不将线程本地对象的地址视为常数,并且涉及此类地址的任何表达式都不视为常数。
The address of a thread local object is not considered constant, and any expression involving such an address is not considered a constant expression.
不将线程本地对象的地址视为常数,并且涉及此类地址的任何表达式都不视为常数。
应用推荐