Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-04-11 08:54:35


David Abrahams wrote:
> "Reece Dunn" <msclrhd_at_[hidden]> writes:
> > Maxim Yegorushkin wrote:
> >> On 4/11/06, Reece Dunn <msclrhd_at_[hidden]> wrote:
> >>
> >> I don't like the idea of the user having to convert whichever string
> >> he happens to use to std::basic_string just to do the conversion.
> >
> > whereas, to be more consistent with the rest of the standard
> > library, you would have something like:
> >
> > T string_to<T>( const std::string & )
> > T wstring_to<T>( const std::wstring & )
> > T basic_string_to<T>( const std::basic_string< CharT, CharTraits, Allocator > & )
>
> I'm not sure consistency is a virtue in this case.

You are right! You just need the generic templatized version that takes a basic_string, as well as overloads for C-style narrow and wide strings.

- Reece
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk