Tool/software: TI C/C++ Compiler
Hi,
I have an issue with using a template argument in a base class. It looks like the compiler doesn't notice the base class at all. Even my actual code is a bit more complex the following code snippet demonstrates the issue:
template <class T1>
class Foo
{
public:
T1 p1;
virtual void dump() {
printf("%08X: %i\n", this, p1);
}
};
template <class T1, class T2>
class Bar : public Foo<T1>
{
public:
T2 p2;
virtual void dump() {
printf("%08X: %i, %i\n", this, p1, p2); // error #20: identifier "p1" is undefined
}
};
void test()
{
Bar<int, int> bar;
bar.p1 = 1; // ok !!!
bar.p2 = 2;
bar.dump();
}
The same code works fine with MS VC.
I am using SYS/BIOS v6.35.06.56, XDCTools v3.25.06.96 and ARM CGT v5.2.5
Any idea?
Thanks, Lars