阅读背景:

默认模板参数:为什么编译器抱怨没有指定模板参数?

来源:互联网 

I have this code:

我有这段代码:

struct A{};

template<class T = A>
struct B {
    void foo() {}
};

B b; //Error: missing template arguments before 'b'
     //Error: expected ';' before 'b'
     //More errors
b.foo()
struct A{};

temp



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

分享到: