摘要: 7.1.5.3 详细类型说明符elaborated-type-specifier:class-key ::opt nested-name-specifieropt identifierclass-key ::opt nested-name-specifieropt templateopt template-idenum ::opt nested-name-specifieropt identifiertypename ::opt nested-name-specifier identifiertypename ::opt nested-name-specifier templateopt te 阅读全文
posted @ 2006-04-13 10:06 Goncely 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 7.1.5.2 简单类型说明符1、简单类型声明符为simple-type-specifier:::opt nested-name-specifieropt type-name::opt nested-name-specifier template template-id(此处的template应该是可选的,因为定义std::list<int> l;和std::template list<int> l;都是合法的)charwchar_tboolshortintlongsignedunsignedfloatdoublevoidtype-name:class-nameenum 阅读全文
posted @ 2006-04-13 10:05 Goncely 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 7.1.5.1 cv限定符1、共有两个cv限定符:const和volatile。如果cv限定符出现在decl-specifier-seq中,声明的init-declarator-list部分不能为空。[注:3.9.3讨论了cv限定符是如何影响对象和函数类型的]2、在名字空间作用域中声明的const限定类型对象具有外部链接属性,除非对象是通过extern声明的,或者对象先前已被声明为外部链接。通过整型常量表达式初始化的非volatile但const限定的整型变量或枚举类型可当作整型常量表达式使用(5.19)。[注:如8.5所述, const限定类型的对象或子对象的定义必须包含初始化体,或者此定义 阅读全文
posted @ 2006-04-13 10:01 Goncely 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 7.1.5 类型说明符1、类型说明符包括type-specifier:simple-type-specifierclass-specifierenum-specifierelaborated-type-specifiercv-qualifier一个通用的规则是:在声明的decl-specifier-seq中至多只允许出现一种类型说明符。以下情况例外:——const或者volatile可以和其它类型声明符结合使用。但是,冗余的cv限定符是不允许的,除非是被类型定义(7.1.3)或模板类型参量(14.3)引入,在这种情况下冗余的cv限定符被忽略。——signed和unsigned可以和char,l 阅读全文
posted @ 2006-04-13 10:00 Goncely 阅读(277) 评论(0) 推荐(0) 编辑