在学习boost的过程中,我们发现在boost的文档中,多处提及了complete type和incomplete type。到底什么是complete type呢?经过我查找msdn,终于发现了,原来complete type是编译器能够确定类型大小的类型,incomplete type是编译器不能确定类型大小的类型。incomplete type有:
看看msdn吧:
An incomplete type is a type that describes an identifier but lacks information needed to determine the size of the identifier. An "incomplete type" can be:
The void type is an incomplete type that cannot be completed. To complete an incomplete type, specify the missing information. The following examples show how to create and complete the incomplete types.
ps pointer points to an incomplete structure type called student. struct student *ps;
struct student
{
int num;
} /* student structure now completed */char a[]; /* a has incomplete type */
char a[25]; /* a now has complete type */
发表于 @ 2005年02月03日 09:38:00 | 评论( loading... ) | 举报| 收藏