|
Boost : |
Subject: Re: [boost] Review Request: Introduction of boost::string, namespace and string-conversion functions
From: Anders Dalvander (boost_at_[hidden])
Date: 2009-02-14 13:45:50
On Sat, 14 Feb 2009 22:41 +1100 Vladimir Batov wrote:
> Yes, 'convert' is well worth considering. It might work both ways as
> well.
> Like
>
> string s = boost::string::convert(-1); // to string
> int i = boost::string::convert(str); // from string
That would be:
string s = boost::string::convert(-1); // to string
int i = boost::string::convert<int>(str); // from string
And with that we're almost back at the interface of boost::lexical_cast
once again.
Also the user might want to convert between std::wstring and
std::string, and in C++0x, std::u8string, std::u16string, and
std::u32string.
Regards,
Anders Dalvander
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk