
"Reece Dunn" <msclrhd@hotmail.com> writes:
Maxim Yegorushkin wrote:
On 4/11/06, Reece Dunn <msclrhd@hotmail.com> wrote:
[]
The string_to<T> function could have basic_string and wstring overloads, but this would be inconsistent with the rest of the C++ library.
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.
The overloaded version would look something like:
T string_to<T>( const std::string & ) T string_to<T>( const std::wstring & ) T string_to<T>( const std::basic_string< CharT, CharTraits, Allocator > & )
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. -- Dave Abrahams Boost Consulting www.boost-consulting.com