#include #include #include #include namespace { namespace detail { template struct is_aggregated_type_available_helper { typedef void type; }; } template struct is_aggregated_type_available { enum { value = false }; }; template struct is_aggregated_type_available< T, typename detail::is_aggregated_type_available_helper::type > { enum { value = true }; }; } namespace { struct x { typedef std::string aggregated_type; }; struct y { }; } int main(int, char*) { std::cout << is_aggregated_type_available::value << std::endl; std::cout << is_aggregated_type_available::value << std::endl; }