阅读背景:

类中不允许使用不完整类型,但允许在类模板中使用

来源:互联网 

The following is invalid code:

以下是无效代码:

struct foo {
    struct bar;
    bar x;        // error: field x has incomplete type
    struct bar{ int value{42}; };
};

int main() { return foo{}.x.value; }
str



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: