I found a strange code about template in SO. It is like declaring template signature twice.
template <typename Tf, Tf F>
class Collection;
template <typename K, typename ... I, HashFunction<K, I...> F> //<-- #B1
class Collection<HashFunction<K, I...>, F> //<-- <> again! #B2
{ /*.......*/ }
What is the meaning of repeating declaration of the template (#B1
& #B2
)?
Which C++ specification allows <>
twice?
What is it called? ... I want to dig more about it.
Is it a kind of alias?
How can it be useful, generally?
I don't find such signature in cppreference.
Is it a bleeding-edge C++ syntax?