Re-implement result<...> as sum type
The `result` class predates the sum type API in CAF and used a flag for selecting one of several members. Re-implementing the class with a `variant` instead is both cleaner and more idiomatic. Furthermore, the implementation for `result` now uses a base type that wraps state as well common constructors. The class `result` is merely a thin wrapper around the base with additional constructors. For example, results with a single template parameter allow conversion from `expected`. This fixes #989 by avoiding catch-all constructors and unreliable `enable_if` magic.
Showing
Please register or sign in to comment