Even you have:
TMap::Type = std::map.
But before you call test(tmap)
TMap::Type tmap;
tmap[1.1] = 5.2;
double d = test(tmap);
You already have it declared as
TMap::Type tmap;
why this information can not be utilized. #typedef is not just simple string replacement.