Boost logo

Boost :

From: Joaquin M López Muñoz (joaquinlopezmunoz_at_[hidden])
Date: 2020-06-07 09:12:22


El 07/06/2020 a las 11:00, Joaquin M López Muñoz escribió:
> I'd say this doesn't add complexity for the user, but on the contrary
> makes it
> easier to detect and adapt result types. I'm thinking about something
> like this:
>
> [...]
>       static bool has_error(T& x){return static_cast<bool>(x);}

This should be

 Â Â Â Â Â  static bool has_error(T& x){return !static_cast<bool>(x);}

Of course.

Another question: why does leaf::catch_<E> require that E be derived from
std::exception? Can't I throw any arbitrary type I please?

Joaquín M López Muñoz


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