i have an old codebase here, where they used protected member variables. Whether or not this is a good idea can be discussed. However, the code must have compiled fine with
When you're defining the derived template, the compiler only knows the base template class' name but not its details, so compiler doesn't know the derived class has an inherited member. In order to tell the compiler of the member's existence, use this->, just like you did.
Actually, it is a duplicate of this question.