Let\'s say I have some templated class depending on type T. T could be almost anything: int, int*, pair
You want to determine whether it is a non-union class. There is no way known to me to do that (and boost hasn't found a way either). If you can live with union cases false positives, you can use a is_class.
template struct void_ { typedef void type; };
template
struct is_class { static bool const value = false; };
template
struct is_class::type> {
static bool const value = true;
};
Boost has an is_union that uses compiler-specific builtins though, which will help you here. is_class (which boost also provides) combined with is_union will solve your problem.