Я ценю помощь выяснить, что происходит в этой проблеме, которая придет в моем коде, который я сводилась к следующему:Ошибка: Шаблон класса частичная специализация содержит параметр шаблона, который не может быть выведен
typedef unsigned short ushort;
template<typename T = ushort*>
struct Foo
{
};
// Specialization -- works when not a specialization
template<
template<typename,typename> class Container ,
template<typename , template<typename,typename> class> class MetaFunction
>
struct Foo<Container<ushort,typename MetaFunction<ushort,Container>::Type> >
{
//typedef Container<ushort,typename MetaFunction<ushort,Container>::Type> TestType; // OK
};
int main()
{
}
на компиляции (GCC 5.4.0) я получаю ошибку:
Test.cpp:14:8: error: template parameters not deducible in partial specialization:
struct Foo<Container<ushort,typename MetaFunction<ushort,Container>::Type> >
^
Test.cpp:14:8: note: ‘template<class, template<class, class> class<template-parameter-2-2> > class MetaFunction’
как ни странно, аргумент Container<ushort,typename MetaFunction<ushort,Container>::Type>
специализации оказывается справедливым.