Bitwizeshift Result Versions Save

A lightweight C++11-compatible error-handling mechanism

v1.0.0

3 years ago

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

Features

  • result<T,E> for representing fallible types
  • result<T&,E> for fallible reference types
  • result<void,E> for fallible non-value types (e.g. void returns)
  • failure<T> for disambiguation for error types
  • failure<T&> for referential access of T types
  • Support for comparison operators of result and failure types
  • Support for std::hash for result and failure types
  • Support for monadic functions for result (map, flat_map, map_error, flat_map_error, value_or, and_then)
  • Full constexpr support for result and failure (more constexpr support in C++14 and above)
  • Support for CTAD for failure types when working in C++17

Compatibility

This release is compatible with any C++11 compiler or later.

In particular, it's known to be compatible with the following compilers:

  • GCC: 5, 6, 7, 8, 9, 10
  • Clang: 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10, 11
  • Apple Clang (Xcode) 10.3, 11.2, 11.3, 12.3
  • Visual Studio 2017[1], 2019

[1] Visual Studios 2017 is officially supported, though toolchain 14.16 has some issues properly compiling map_error due to insufficient support for SFINAE.

v0.0.1+test7

3 years ago

Pre-release to test conan release workflow

v0.0.1+test4

3 years ago

This pre-release is to test the conan deployment workflow.