C++ n3290:详细类型说明符语法已更改?
2003 C++03文档中的要点: 详细类型规范:第3.4.4节第1段:C++ n3290:详细类型说明符语法已更改?,c++,c++11,C++,C++11,2003 C++03文档中的要点: 详细类型规范:第3.4.4节第1段: "An elaborated-type-specifier may be used to refer to a previously declared class-name or enum-name even though the name has been hidden by a non-type declaration. **The class-name or en
"An elaborated-type-specifier may be used to refer to a
previously declared class-name or enum-name even though
the name has been hidden by a non-type declaration. **The
class-name or enum-name in the elaborated-type-specifier
may either be a simple identifier or be a qualified-id.**"
但在n3290草案中,他们更改了详细的类型说明符(7.1.6.3)
7.1.6.3:详细的类型规范
elaborated-type-specifier:
class-key attribute-specifier-seqopt nested-name-specifieropt identifier
class-key nested-name-specifieropt templateopt simple-template-id
enum nested-name-specifieropt identifier
我可以知道吗
1) 早期支持typename c++03的语法有什么问题
7.1.5.3 Elaborated type specifiers
elaborated-type-specifier:
class-key ::opt nested-name-specifieropt identifier
class-key ::opt nested-name-specifieropt templateopt template-id
enum ::opt nested-name-specifieropt identifier
typename ::opt nested-name-specifier identifier
typename ::opt nested-name-specifier templateopt template-id
2) 编译器是否真的遵循/未遵循此规则…(哪个编译器支持此更改)
3) 当达到上述第3.4.4/1点时
The class-name or enum-name in the elaborated-type-specifier
may either be a simple identifier or be a qualified-id
为什么在c++0x中不允许它
有人解释一下吗?
有人解释一下吗
(当我试图添加c++0x标记时,它不是..标记..请选择任何一个..添加c++0x标记?)
typename说明符
现在不是一种精巧的类型说明符
,但它们都是尾部类型说明符
李>
nested-name-specifier\u opt identifier