Is it possible to return type of an object? For example I would like to have construct like this:
//pseudocode
template<class T>
void f(int value)
{
//depends on type T different action can be taken
}
template<class T>
type getType(T obj)
{
return (type of obj);
}
and then in main:
f<getType(Object)>(value);