samedi 16 mai 2020

Disallow duplicate types in parameter pack

In this example:

template<Types...>
struct MyStruct {};

How do I disallow (ie static_assert) duplicate types in the template parameter pack?

Note: I'm using C++14 but also interested in C++17.

Aucun commentaire:

Enregistrer un commentaire