Boost logo

Boost :

Subject: Re: [boost] [conversion] try_lexical_cast and 200$
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-12-13 05:14:00


On 12/11/2013 09:36 PM, Antony Polukhin wrote:

> bool try_lexical_cast<Out, In>(Out&, const In&)
> bool try_lexical_cast<Out, In>(const In&, Out&)
> boost::optional<Out> try_lexical_cast<Out, In>(const In&)

Another possibility is to provide a parameter that is returned if the
conversion fails, something like this:

   Out lexical_cast<Out, In>(const In& input, const Out& failed_output)


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