I was programming & eventually ran into a situation, which isn't very self-explanatory for me. Allow me to demonstrate:
1 2 3 4 5 6 7
template<class T>
class Foo{
public:
// Methods
protected:
T data;
};
Here's a simple templateclass that contains a member variable data. Now, the situation I find problematic is like the following:
class Foo2 : public Foo<SomeObject>, public Foo<AnotherObject>
This is the start of a class declaration, which inherits from the templateclass Foo twice bit differently. Now, how can I know, which data member variable I'm calling inside class Foo2? I find it quite ambitious.