Boost logo

Boost :

Subject: Re: [boost] [conversion] try_lexical_cast and 200$
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-12-13 06:51:20


Thank you all for giving comments and ideas!

Looks like it'll be `bool try_lexical_convert<Out, In>(const In&, Out&)`:

 * boost::optional version adds additional dependency + boost::optional
does not support move semantics well, so it'll be hard to implement a very
efficient try_lexical_convert with current boost::optional
* returning bool looks like the simplest solution that can be easily
adopted by user
* output parameter is at the last position (like it is done in many
Standard Library methods)
* name contains "convert" instead of "cast", because function does not look
like a cast

-- 
Best regards,
Antony Polukhin

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