Boost logo

Boost :

From: Bjorn Karlsson (bjorn.karlsson_at_[hidden])
Date: 2002-01-24 10:33:31


> From: Peter Dimov [mailto:pdimov_at_[hidden]]
>
> 1)
>
> #include <boost/lexical_cast.hpp>
> #include <string>
> #include <iostream>
>
> int main()
> {
> std::cout << boost::lexical_cast<std::string>("this is a test");
> }
>
> 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 agree. Is it to small to deserve its own header (boost/to_string)?

Bjorn



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