I'm trying to do something like this, and that cannot work because Mixin cannot know what TemplateStruct<T> is just from knowing about Inner.
How can I modify the code to make it work?
namespace lib {
template <class T>
struct Mixin {};
template <class T>
struct Component : Mixin<T> {};
}
struct Struct {
struct Inner {};
};
// This works just fine.
template <>
struct lib::Mixin<typename Struct::Inner> {};
template <class T>
struct TemplateStruct {
struct Inner {};
};
// error: template parameters not deducible in partial specialization
template <class T>
struct lib::Mixin<typename TemplateStruct<T>::Inner> {};