Let's say I have a simple template class like this:
template<class x> class TParent
{
public:
int Variable;
};
template<class x> class TChild : public TParent<x>
{
typedef TParent<x> SUPER;
public:
void Method() { Variable = 1; }; // *ERROR* needs to be SUPER::Variable = 1;
};
It works fine with Microsoft compiler, but LLVM & Clang don't like it and need the mentioned change. But it has no sense and it all works fine if the classes are not templates. Is there a way to disable this riddiculous error?
Of course it's very easy to fix that and for smaller classes it is acceptable, but if the template is a huge class consisting of thousands of lines, accessing members from the parent all the time, it makes the code very ugly and hard to read.