Gilbert Chang
2003-10-18 01:03:37 UTC
The standard C++ library does not seem to pre-instantiate the basic_string
specialization with unsigned short. I couldn't manually get g++ to
instantiate it either. The problem can be reproduced with the following
code. This is with g++ v3.2. Any idea? Thanks.
#include <string>
typedef unsigned short Chr;
typedef std::basic_string<Chr, std::char_traits<Chr>, std::allocator<Chr> >
ustring;
int main(void) {
unsigned short c = 0x1234;
ustring s(&c);
ustring s2 = s;
}
specialization with unsigned short. I couldn't manually get g++ to
instantiate it either. The problem can be reproduced with the following
code. This is with g++ v3.2. Any idea? Thanks.
#include <string>
typedef unsigned short Chr;
typedef std::basic_string<Chr, std::char_traits<Chr>, std::allocator<Chr> >
ustring;
int main(void) {
unsigned short c = 0x1234;
ustring s(&c);
ustring s2 = s;
}