Giter Site home page Giter Site logo

gmh5225 / outcome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ned14/outcome

0.0 1.0 0.0 141.99 MB

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

Home Page: https://ned14.github.io/outcome

License: Other

Shell 0.34% C++ 86.75% Python 1.60% C 0.25% Assembly 9.00% HTML 0.01% CMake 1.77% Starlark 0.28%

outcome's Introduction

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-----

outcome's People

Contributors

ned14 avatar akrzemi1 avatar cstratopoulos avatar hazelnusse avatar burningenlightenment avatar libbooze avatar johnthagen avatar menuet avatar ecatmur avatar norbertwenzel avatar vinipsmaker avatar andoks avatar catskul avatar hyeongyukim avatar jenkins-nedprod avatar sdarwin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.