Help: who has gcc 4.0 or higher# Programming - 葵花宝典
c*e
1 楼
plz compile below code for me if you could, thx.
#include
/*
//normal one works
template
class Base
{
public:
Base (int i) : i_ (i) {}
private:
int i_;
};
template
class Upper : public Base >
{
public:
Upper (int t) : Base > (t) {}
};
int main ()
{
Upper up (1);
}
*/
//template template workes with implicit base mem call
//but can not call explicitly.
template class Derived>
class Base
{
public:
#include
/*
//normal one works
template
class Base
{
public:
Base (int i) : i_ (i) {}
private:
int i_;
};
template
class Upper : public Base
{
public:
Upper (int t) : Base
};
int main ()
{
Upper
}
*/
//template template workes with implicit base mem call
//but can not call explicitly.
template class Derived>
class Base
{
public: