Why doesn't the following work?
template <typename Type>
class A
{
public:
Type data_;
};
template <typename Type>
class B: public A<Type>
{
public:
void set()
{
data_ = 4;
}
};
int main()
{
B<int> b;
b.set();
return 0;
}
If you declare "using A<Type>::data_;" then it works. If you use normal
classes, this works without "using". I don't get it. Tested with
msvc2005 and comeau. Words from the standard?
--
Kalle Rutanen
http://kaba.hilvi.org