26 May
2014
26 May
'14
12:47 p.m.
On 2014-05-26 14:37, Vladimir Batov 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
Roland Bock-2 wrote throwable/non-throwable/default-returning/etc. behavior, right? Right :-) How about non-throwing failure detection? What should be the signature for that behavioral callable? optional<T> op()()?
Personally, I would not use that (preferring either default or exception), but yes, I guess so. Regards, Roland