From: Olaf van der Spek (olafvdspek_at_[hidden])
Date: 2006-04-16 13:59:22
On 4/16/06, Reece Dunn <msclrhd_at_[hidden]> 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.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk