vendredi 31 juillet 2020

How to check if a template parameter is a struct/class?

For a small example like this, I want to only accept T if T is a struct/class and reject builtin types like 'int', 'char', 'bool' etc.

template<typename T>
struct MyStruct
{
   T t;
};

Aucun commentaire:

Enregistrer un commentaire