M
muler
Hi,
Consider this:
template <class X>
class Base {
public:
typedef double T;
};
template <class T>
class Derived : Base<int> { // nondependent base
public:
T strange_; // T is Base<int>::T not template parameter T
};
Question: how can I refer to template parameter T in the derived class
without: 1) changing the typedef in Base and 2) changing the name of
template parameter T in Derived to sth else?
Thanks!
Consider this:
template <class X>
class Base {
public:
typedef double T;
};
template <class T>
class Derived : Base<int> { // nondependent base
public:
T strange_; // T is Base<int>::T not template parameter T
};
Question: how can I refer to template parameter T in the derived class
without: 1) changing the typedef in Base and 2) changing the name of
template parameter T in Derived to sth else?
Thanks!