This is something that was not in C ++ before C ++ 11. In C ++ 11, you can use template using :
template<typename Key, typename Value> using hashMap = tr1::unordered_map<Key, Value>;
The usual workaround for C ++ 03 is to create a template structure with a type member:
template<typename Key, typename Value> struct hashMap { typedef tr1::unordered_map<Key, Value> type; };
Inheritance from a class is possible in theory, but usually users abstain from this, since STL classes were not intended to be inherited.
source share