使用QSharedDataPointer报incomplete-type错误

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qyvlik/article/details/77119966

使用QSharedDataPointer报incomplete-type错误

使用 QSharedDataPointer 时,报编译错误 invalid use of incomplete type of 'class XXX',主要是没有对类的 operator= 函数进行重载。

一般要实现类的默认构造函数拷贝构造函数赋值运算符虚构函数

具体查看 QSharedDataPointer with forward-declared class


QSharedDataPointer with forward-declared class

猜你喜欢

转载自blog.csdn.net/qyvlik/article/details/77119966