There are two cv-qualifIErs,const and volatile. If a cv-qualifIEr
appears in a decl-specifIEr-seq,the init-declarator-List of the
declaration shall not be empty.
以上粗体语句的相关性是什么?换句话说,是否可以在decl-specifIEr-seq中生成cv-unqualifIEd类型的示例,其中声明的init-declarator-List为空?
解决方法 当然,大多数类和枚举定义都使用它:struct A { }; // valIDconst struct B { }; // invalID,const would have no meaningconst struct C { } c { }; // valID
没有别的. init-declarator-List仅用于简单声明,为此,标准(C 11)声明:
总结7 Declarations [dcl.dcl]
3 In a simple-declaration,the optional init-declarator-List can be omitted only when declaring a class (Clause 9) or enumeration (7.2),that is,when the decl-specifIEr-seq contains either a class-specifIEr,an elaborated-type-specifIEr with a class-key (9.1),or an enum-specifIEr.
以上是内存溢出为你收集整理的这个陈述在C标准7.1.6.1/1中的相关性是什么?全部内容,希望文章能够帮你解决这个陈述在C标准7.1.6.1/1中的相关性是什么?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)