EDIT . In fact, I didn’t have the opportunity to check any proposed solutions when I went on vacation, and by the time I returned, the people responsible for the class template made some changes that allowed me to bypass the need to use the types defined in the class template itself.
Thanks to everyone for their help.
In short - and feel free to correct my wording, the templates are still a little voodoo for me - I need to know if I can use the ( protected ) struct or #typedef defined inside the class template from my specialized class. For instance:
This is the class template:
template<typename T> class A : public C<T> { protected: struct a_struct { }; void foo( a_struct a ); };
Why do I need to fully specialize in T = VAL :
template<> class A< VAL > : public C< VAL > { void foo( a_struct a ) {
If I do something like this, the compiler complains that a_struct is undefined in my specialized class. I tried to specialize and inherit from the class template, but it was ... dirty.
I saw some solutions, but they all included modifying the class template, which I cannot easily do (command).
Thoughts?
source share