You could do it like this:
#include <type_traits>
template <class ... Trest>
struct unique_types;
template <class T1, class T2, class ... Trest>
struct unique_types<T1, T2, Trest ...>
: unique_types<T1, T2>, unique_types<T1, Trest ...>, unique_types<T2, Trest ...> {};
template <class T1, class T2>
struct unique_types<T1, T2>
{
static_assert(!std::is_same<T1, T2>::value, "Types must be unique");
};
int main()
{
// OK.
unique_types<int, double, char, float> foo;
// Should not compile.
unique_types<int, double, char, double> bar;
}