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:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at