Boost logo

Boost :

Subject: Re: [boost] [review] Convert library
From: Vladimir Batov (vb.mail.247_at_[hidden])
Date: 2014-05-26 08:37:05


Roland Bock-2 wrote
> Using one of the many suggestions for the syntax, please change to what
> you end up with:
>
> int t = boost::convert
> <int>
> ::from("17", []{
> log("could not read noOfThreads");
> throw ConfigError(); });
>
> int c = boost::convert
> <int>
> ::from("17", []{
> log("could not read noOfCores, using default");
> return 7; });

That looks cool. We might provide a bunch of callables to cover
throwable/non-throwable/default-returning/etc. behavior, right? How about
non-throwing failure detection? What should be the signature for that
behavioral callable? optional<T> op()()?

--
View this message in context: http://boost.2283326.n4.nabble.com/review-Convert-library-tp4662821p4662905.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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