
30 Jan
2012
30 Jan
'12
7:04 a.m.
std::u32string stdstr; const char * cstr = stdstr.c_str< char >(); //
?????????
That's a compile time error. The unspecified iterator type returned will not be const char*. It will be a conversion iterator with a value type of char, and thus only useful directly in purpose written code or in generic algorithms templated on iterator type.
In that case, perhaps a more appropriate name would be cbegin<> instead of c_str<> Keith