• Stars
    star
    658
  • Rank 65,859 (Top 2 %)
  • Language
    C++
  • License
    Other
  • Created almost 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provides very lightweight outcome<T> and result<T> (non-Boost edition)
master branchdevelop branch

CTest dashboard: https://my.cdash.org/index.php?project=Boost.Outcome

All tests passing source tarballs: https://github.com/ned14/outcome/releases

Documentation: https://ned14.github.io/outcome/

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:

wget https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp

On BSD:

fetch https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp

If you have curl installed:

curl -O -J -L https://github.com/ned14/outcome/raw/master/single-header/outcome.hpp

Otherwise, simply download the raw file from above and place it wherever it suits you. If you might be debugging using Microsoft Visual Studio, you may find the debugger visualisation file at https://github.com/ned14/outcome/raw/master/include/outcome/outcome.natvis useful to include into your build.

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

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2

mDMEVvMacRYJKwYBBAHaRw8BAQdAp+Qn6djfxWQYtAEvDmv4feVmGALEQH/pYpBC
llaXNQe0WE5pYWxsIERvdWdsYXMgKHMgW3VuZGVyc2NvcmVdIHNvdXJjZWZvcmdl
IHthdH0gbmVkcHJvZCBbZG90XSBjb20pIDxzcGFtdHJhcEBuZWRwcm9kLmNvbT6I
eQQTFggAIQUCVvMacQIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRCELDV4
Zvkgx4vwAP9gxeQUsp7ARMFGxfbR0xPf6fRbH+miMUg2e7rYNuHtLQD9EUoR32We
V8SjvX4r/deKniWctvCi5JccgfUwXkVzFAk=
=puFk
-----END PGP PUBLIC KEY BLOCK-----

More Repositories

1

llfio

P1031 low level file i/o and filesystem library for the C++ standard
C++
753
star
2

nedmalloc

An EXTREMELY FAST portable thread caching malloc implementation written in C for multiple threads without lock contention based on dlmalloc. Optimised for x86 and x64. Compatible with C++. Can patch itself into existing binaries on Windows.
C
392
star
3

nedtries

A portable in-place bitwise binary Fredkin trie algorithm which allows for near constant time insertions, deletions, finds, closest fit finds and iteration. Is approx. 50-100% faster than red-black trees and up to 20% faster than O(1) hash tables.
C++
270
star
4

pcpp

A C99 preprocessor written in pure Python
Python
203
star
5

quickcpplib

Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
C
118
star
6

status-code

Proposed SG14 status_code for the C++ standard
C++
62
star
7

stl-header-heft

Measures how parsing overweight the major STLs have become
Python
52
star
8

uthash

A GIT clone of uthash.sourceforge.net, a hash table, implemented in C, supporting constant-time add/find/remove of C structures. Any structure having a unique, arbitrarily-typed key member can be hashed by adding a UT_hash_handle member to the structure and calling these macros.
C
35
star
9

ntkernel-error-category

A C++ 11 std::error_category for the NT kernel's NTSTATUS error codes
C++
33
star
10

Easyshop

An E-Commerce solution for Plone supporting a shopping basket, stock quantities, differing delivery and taxation rules based on criteria, product variants and Paypal payment processing
Python
26
star
11

static-website-activitypub

Wraps a static website generator with an ActivityPub client-to-server implementation
Python
22
star
12

mcpp

A C99 conforming preprocessor
C
20
star
13

zero-copy-socket-test

C++
13
star
14

FastDirectoryEnumerator

Enumerates very, very large directories quickly by directly using kernel syscalls. For POSIX and Windows. WARNING THIS IS OBSOLETE. USE BOOST.AFIO INSTEAD.
C++
13
star
15

kerneltest

C++14 automated code test infrastructure with permutation, fuzzing, sanitising and edge coverage
C++
11
star
16

BEurtle

TortoiseXXX plugin for the Bugs Everywhere distributed issue tracker
Python
11
star
17

automodinit

Solves the problem of forgetting to keep __init__.py files up to date
Python
10
star
18

tnfox

FOX for Tn
C++
10
star
19

boost-trunk

NO LONGER UPDATED NOW BOOST HAS MOVED TO MODULARISED GIT
C++
7
star
20

NiallsCPP11Utilities

Some C++ 11 rewrites of useful stuff from TnFOX (http://www.nedprod.com/TnFOX/)
C
7
star
21

Bugs-Everywhere-for-BEurtle

Bugs Everywhere is a “distributed bugtracker” designed to complement distributed revision control systems
Python
5
star
22

VL53L3CX_rasppi

Port of the 2020 support library to Raspberry Pi for the VL53L3CX Time-of-Flight ranging sensor with advanced multi-object detection
C
5
star
23

boost-bmv-cmake

Mock up of what a bare minimum viable cmakeification of Boost would look like
C++
5
star
24

libcurl-cxx-std-networking-integration

Demonstration of libcurl integration into C++ 23 standard networking
C++
4
star
25

BEXML

Provides fast, lazy, RESTful fastcgi access to various issue (bug) trackers. Compilable into a fast binary with IronPython and PyPy for even faster access.
Python
3
star
26

ISO_POSIX_standards_stuff

Reference Implementations for my ISO and POSIX standards change proposals
C
3
star
27

HouseBuild

Tracking progress, open issues, and project milestones of my house build
3
star
28

TripleGit

The world's stupidest triplestore database
C++
2
star
29

ClamAV-Plugin-for-PKP-Open-Journal-Systems

Implements a plugin which scans uploaded documents for viruses
PHP
2
star
30

boostdoc

A Hugo theme generating a Boost C++ Libraries documentation
CSS
1
star
31

c11-permit-object

A C11 and C++11 pthreads permit object. With adaptors for Boost.Thread and Boost.Expected
C++
1
star
32

boost-release

NO LONGER BEING UPDATED
C++
1
star
33

Oxyderkeia

Super secret R&D project
1
star
34

LiveXMLCV

An Interactive Live XML based Curriculum Vitae with XHTML output
JavaScript
1
star
35

dvb_ttusb_ned

Just enough of the TechnoTrend S-2400 Linux kernel driver to cold start a faulty tuner
C
1
star