We have reduced some of the code; we cannot find the correct syntax for a minimal example.
Suppose the following definitions (do not worry about why;)
template <class>
class Element
{};
template <template <class> class>
class Client
{};
template <class>
struct TemplatedProvider
{
template <class T>
using element_template = Element<T>;
};
Now, using C ++ 11, we can use a template template or a type alias template to create an instance of the template Client
. The following function compiles just fine:
void fun()
{
Client<Provider::element_template> client;
Client<TemplatedProvider<int>::element_template> clientBis;
}
But we cannot find the correct syntax in the following case, when the template argument assigned Client
is a dependent name:
template <class T>
void templatedFun()
{
Client<TemplatedProvider<T>::element_template> client;
}
Clang (verified since 3.6) emits the following compilation error:
template argument for template template parameter must be a class template or type alias template
Can this syntax be fixed?