M
multics.cn
Good day, c++ guys.
I have a question about char_traits of user defined "char" type. I
need a string type, which supports "long" as its "char" type, so I
defined a lstring like this:
typedef basic_string<long> lstring;
but I did not define template <> char_traits<long> {...};
It seems following code works:
lstring aLongString;
int aLongString.length();
I do not quite understand the roll of char_traits, can anyone help to
clearify?
Thanks.
I have a question about char_traits of user defined "char" type. I
need a string type, which supports "long" as its "char" type, so I
defined a lstring like this:
typedef basic_string<long> lstring;
but I did not define template <> char_traits<long> {...};
It seems following code works:
lstring aLongString;
int aLongString.length();
I do not quite understand the roll of char_traits, can anyone help to
clearify?
Thanks.