
On 4/16/06, Reece Dunn <msclrhd@hotmail.com> wrote:
The template parameter doesn't look nice (IMO). What about to_basic_string<T> and to_string as alias for to_basic_string<char> and to_wstring as alias for to_basic_string<wchat_t>?
What about when you want to have a different character traits or allocator type for the string you are converting to?
I forgot the other template parameters of basic_string in to_basic_string<T>, but of course they should be there too. The more general approach (to_string< StringT >( x )) would be even better to offer but I still think a simple to_string without template parameters should also be available.
But then you're still limited to basic_string. Can't you make one that can use other containers?
Interesting. However, I would say define it as "to_string< StringT >( x ) will convert the
But then you reintroduced the template parameter.