How do I check if my template class is a specific classtype?

c++, templates, type-traits

Solution

I suppose you could use the `std::type_info` returned by the typeid operator

Problem

In my function template, I'm trying to check whether the type `T` is a specific type. How would I do that? ``` template<class T> int foo(T a) { // check if T of type, say, String? } ```

Original source