er... what I want to know is:
template <class T> void foo(void)
{
switch (typeof(T))
{
}
}
Know what I mean?
you could partially specialize your function, ie. supply distinct
implementations for specific types:
template <class T> void foo(void)
{
//do what should be done for all types except Type1 and Type2 (see below)
}
template <> void foo<Type1>(void)
{
//do what is necessary for Type1
}
template <> void foo<Type2>(void)
{
//do what is necessary for Type2
}
PS: a switch statement only works with integral constants