型 T のジェネリック クラスがあり、T を返す関数があり、typeid(T) == typedef(string) の場合に関数が特定の文字列を返すようにしたい場合はどうすればよいですか?
template<class T>
class Class1
{
public:
Class1();
~Class1();
T func();
};
template <class T>
T Class1<T>::func()
{
string d = "T = string";
if (typeid(string) == typeid(T))
return (T)d; <-- here I got the problem
}