|
发表于 2005-9-10 09:55:10
|
显示全部楼层
不好意思,晚了几天发现这个十分重要的信息:
http://gcc.gnu.org/bugs.html#known
C++
Nested classes can access private members and types of the containing class.
Defect report 45 clarifies that nested classes are members of the class they are nested in, and so are granted access to private members of that class.
这段信息在GCC的Non-bugs栏里面,说明在C++标准委员会的缺陷报告45里面阐明了这个问题。很可能是ISO/IEC 14882:2003的一部分,因此老的文献可能查不到。
希望大家能注意一下! |
|