Minimal example:
template<template<class ...> class>
struct templ {};
template<class T>
using special = templ<T::type>;
int main() {}
clang++:
test.cpp:5:23: error: template argument for template template parameter must be a class template or type alias template
using special = templ<T::type>;
Indeed, I mean to say that T::type
is a class template, e.g.
struct detail1 {
template <class T>
using type = std::vector<T>;
};
struct detail2 {
template <class T>
struct type {};
};
But how can one say this? g++ suggests to use typename T::type
, but this seams wrong to me, and indeed, this does not solve the error.