阅读背景:

gcc和clang在操作符重载解析期间隐式实例化模板参数

来源:互联网 

Consider this code:

考虑这段代码:

struct A; // incomplete type

template<class T>
struct D { T d; };

template <class T>
struct B { int * p = nullptr; };

int main() {
    B<D<A>> u, v;
    u = v;  // doesn't compile; complain that D<A>::d has incomplete type
    u.operator=(v); // compiles
}
struct A; // in



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

分享到: