A lightweight C++11-compatible error-handling mechanism
This is the official release of the Result library!
This provides a result
-API similar to other modern languages like Rust and Swift
The full API reference for this version can be found here: v1.0.0 API
result<T,E>
for representing fallible typesresult<T&,E>
for fallible reference typesresult<void,E>
for fallible non-value types (e.g. void
returns)failure<T>
for disambiguation for error typesfailure<T&>
for referential access of T
typesresult
and failure
typesstd::hash
for result
and failure
typesresult
(map
, flat_map
, map_error
, flat_map_error
, value_or
, and_then
)constexpr
support for result
and failure
(more constexpr
support in C++14 and above)failure
types when working in C++17
This release is compatible with any C++11 compiler or later.
In particular, it's known to be compatible with the following compilers:
[1] Visual Studios 2017 is officially supported, though toolchain 14.16 has some issues properly compiling map_error due to insufficient support for SFINAE.
Pre-release to test conan release workflow
This pre-release is to test the conan deployment workflow.