12 Dec
2013
12 Dec
'13
5:35 p.m.
On Thu, Dec 12, 2013 at 6:11 AM, Antony Polukhin <antoshkka@gmail.com>wrote:
2013/12/12 Krzysztof Czainski <1czajnik@gmail.com>
How about: boost::optional<Out> lexical_cast<Out, In>(const In&, std::nothrow_t)
This will break one of the use cases. For example there'll be an ambiguity beacause of function overloads.:
std::transform( values.begin(), values.end(), ret.begin(), &boost::lexical_cast<std::string, int> );
You can still have that interface, not break existing code, and make it easy to do similar stuff with the nothrow version. A little hackish, but: http://codepaste.net/py5ot3 -- -Matt Calabrese