I want to ask something about the template class. I know the basics like:
template<typename X, typename Y>
class tmp{
...
}
However, in the starter file of my programming assignment, I saw a new format as:
template<typename X, typename... Y>
class tmp<std::tuple<Y...>,X>{
...
}
Here, I know "..." is the parameter pack, but why there is another "< >" after the name of the class??
This :
is a notation to say:
We have a template with parameter
X
and a parameter packY
. The classtmp
is a template class that use the parameter packY
in atuple
variable, andX
as a simple template variable.However this is a specialization of the template.