-
Book Overview & Buying
-
Table Of Contents
Advanced C++ [Instructor Edition]
By :
If you have used the std::string class, then you have been using an alias. There are a few template classes related to strings that need to implement the same functionality. But the type representing a character is different. For example, for std::string, the representation is char, while std::wstring uses wchar_t. There are several others for char16_t and char32_t. Any variation in the functionality will be managed through traits or template specialization.
Prior to C++11, this would have been aliased from the std::basic_string base class, as follows:
namespace std {
typedef basic_string<char> string;
}
This does two main things:
typedef std::unique_ptr<std::map<std::string,myClass>> UptrMapStrToClass;