Boost logo

Boost :

From: larsbj_at_[hidden]
Date: 2002-01-24 11:05:05

"David Abrahams" <david.abrahams_at_[hidden]> 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?


Boost list run by bdawes at, gregod at, cpdaniel at, john at