Provides very lightweight outcome<T> and result<T> (non-Boost edition)
Assembly C++ Python CMake Shell C
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
abi-compliance Refresh ABI dumps. Mar 26, 2018
benchmark Refactored the payload part of the tutorial to match recent changes. Oct 29, 2017
boostify Fixed regression in earlier bug fix where exact type construction fai… May 30, 2018
cmake Fix build brokenness Jun 22, 2018
conan Update docs with Conan packaging support. Oct 28, 2017
doc upd Jul 3, 2018
include upd Aug 15, 2018
single-header upd Aug 15, 2018
test Fix build brokenness Jun 22, 2018
.boostify boost_result is finally working, boost_outcome is close, just one las… Mar 30, 2018
.ci.cmake try again fix CI Jun 14, 2017
.clang-format Purge last remaining vestiges of monadic future promise. It's now onl… May 22, 2016
.clang-format-ignore Begin work on issue #110 by moving traits into their own header, vari… Mar 6, 2018
.clang-tidy upd Dec 14, 2017
.docs.cmake Tutorial landing page is now calculated by Hugo with page summaries. Oct 17, 2017
.gitattributes Add gitattributes Jun 4, 2015
.gitignore Upgraded Outcome to use quickcpplib's new cached scan file framework.… Jul 3, 2017
.gitmodules Move the C result support and status-code into an experimental directory Mar 14, 2018
.quickcpplib Build system ported over to use quickcpplib Jun 14, 2017
.travis.yml Added much clearer compile failure when user tries `result<T, T>` or … Mar 28, 2018
CMakeLists.txt upd Aug 15, 2018
CTestConfig.cmake Outcome now working very well on Windows and Linux with boost lite cm… Jul 14, 2016
Doxyfile Temporarily place a set of doxygen dumped reference docs into the Out… Oct 6, 2017
Licence.txt Relicenced all code to be dual Apache 2.0 or Boost licence May 2, 2017 upd Apr 25, 2018
appveyor.yml wip in getting result to throw with payload. Oct 26, 2017
index.html Began merging the latest tooling improvements from AFIO into Outcome Aug 6, 2016 Freshen constexpr results for GCC 5.4 and clang 3.8 Jun 20, 2016 In theory, this is it for the peer review on Friday: code and docs fr… Jan 17, 2018

master branch unit test status: Linux & MacOS: Build Status Windows: Build status

develop branch unit test status: Linux & MacOS: Build Status Windows: Build status

CTest dashboard:


Purpose of this library

Outcome is a C++14 library for reporting and handling function failures. It can be used as a substitute for, or a complement to, the exception handling mechanism.

One use case is for contexts where using C++ exception handling is unsuitable for different reasons:

  • The high relative cost of throwing and catching a C++ exception.
  • Making some or all control paths explicitly detailed to aid code correctness auditing, as opposed to having hidden control paths caused by exceptions potentially thrown from any place.
  • Company policy to compile with exceptions disabled.
  • Maintaining a code base that was never designed with exception-safety in mind.
  • Parts of the programs/frameworks that themselves implement exception handling and cannot afford to use exceptions, like propagating failure reports across threads, tasks, fibers…

Usage as a single header file

Outcome v2 comes in single header file form. This is regenerated per commit. To fetch on Linux:


On BSD and OS X:


On Windows, simply download the raw file from above and place it wherever it suits you.

Pre Boost entry todo:

  • Raise ABI compliance checker on CI.
  • Fix up the .natvis file, and permanently solve the permuting SHA issue.
  • Fix up the C interface to use status_code.

Commits and tags in this git repository can be verified using:

Version: GnuPG v2