Visual Studio 2015 로 전환 중인데 hash_map 이 deprecate 처리되어 있어 당황했다. unordered_map 을 쓰는게 맞는데 코드를 전부 바꾸려니 귀찮았다. unordered_map 을 hash_map 이라는 이름으로 쓰고 싶어서 찾아보니 C++ 11 에 alias template 이라는 방법 있었다.

 

// type alias used to hide a template parameter
template<class CharT>
using mystring = std::basic_string<CharT, std::char_traits<CharT>>;
mystring<char> str;

 

 

출처 : http://en.cppreference.com/w/cpp/language/type_alias

728x90

+ Recent posts