It is possible to provide default type to the template type for class templates. For example,
#include <iostream>
template <typename T = int, typename U = int>
struct Collection
{
T a{};
U b{};
};
template <typename T, typename U>
void printCollection(Collection<T, U> p)
{
std::cout << "{" << p.a << ", " << p.b << "}" << "\n";
}
int main(int argc, char const *argv[])
{
Collection c1{1, 2};
printCollection(c1);
Collection c2;
printCollection(c2);
return 0;
}For c1, CTAD deduces the type as Collection<int,int> and for c2 default types are used which is Collection<int,int>.