From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-24 11:51:41


--- In boost_at_y..., larsbj_at_l... wrote:
> "David Abrahams" <david.abrahams_at_r...> writes:
>
> | ----- Original Message -----
> >
> >> 2) to_string() is the established, novice-friendly name for this
idiom;
> | even
> >> with a working lexical_cast, I'd prefer to_string when I want
to_string
> >> behavior since it leaves less room for errors.
> >
> | I find this argument potent. As far as I'm concerned, you could
stick this
> | in boost/utility.hpp.
>
> Why not make the to_string use lexical_cast then?
>
> template <class V>
> std::string to_string(V const & v)
> {
> return boost::lexical_cast<string>(v);
> }
>
> and do the specialization for lexical_cast so that users of that
also
> can benefit?
>
> --
> Lgb

What specialization you mean? You want be able to make it more
efficient.

Gennadiy.