...4 实作㆒个 Class Template 174 6.5 ㆒个以 Function Template 完成的 Output 运算子 180 6.6 常数算式(Constant Expressions)与预设参数值(Default Parameters) 181 6.7 以 Template 参数作为㆒种设计策略 185 6.8 Member Tempalte Functions 187 Essent...
基于8个网页-相关网页
Constant scalar expressions 常量标量表达式
Another similar frequent request is to allow non-constant expressions to appear as case labels of switch statements.
另一个类似的频繁请求是允许非常量表达式显示为switch语句的case标签。
Syntax takes a transformation expression consisting of template variables and constant expressions and returns the resulting syntax object.
syntax接受一个转换表达式(由模板变量和常量表达式组成)并返回产生的语法对象。
Embedded statements are not allowed in constant expressions, such as the value of an enumeration constant, the width of a bit-field, or the initial value of a static variable.
在常量表达式,比如枚举型常量、位域的宽度或是静态变量的初始值,是不允许使用在这种声明中的。
应用推荐