Well, this is what I am trying to achieve. I have a structure like this:
template<typename...Ts> struct s
{
template<int...Is> struct r
{
};
};
Now I would like to write another template structure:
template<typename r> struct q
{
};
The template must take specializations struct r, and I would like to have access to the template arguments of this instance.
To make it clearer: I would like to write something like this:
using some_specialisation_of_q = q< s<T1,T2,T3>::r<5,6,7> >;
some_specialisation_of_q varname;
And I would like to have access to T1,T2,T3, 5,6,7(or any other template arguments passed to specialists sand r) in the definition q.
My first attempt was something like this:
template<template<typename...Ts> template<int...Is> typename R, typename= typename std::enable_if<std::is_same<R, s<Ts...>::r<Is...>>::value>::type>
struct q
{
//
}
But, unfortunately, this leads to compiler errors.
How can this be achieved?