13 Dec
2013
13 Dec
'13
11:51 a.m.
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