Back to Arangodb

Tutorial

3rdParty/boost/1.78.0/libs/outcome/doc/html/tutorial.html

3.12.9.11.8 KB
Original Source

Tutorial

  1. Essential

The absolute minimum that you need to know to get started with Outcome immediately.

  1. Before we begin

Essential information before you begin the tutorial.

  1. result<>

Gentle introduction to writing code with simple success-or-failure return types.

  1. outcome<>

Success-or-failure return types where failure can take two forms, expected/handled failure and unexpected/abort failure.

  1. No-value policies

Describes the concept of NoValuePolicy and how to use no-value policies.

  1. Coroutines

Using Outcome in C++ Coroutines

  1. Conventions

Why you should avoid custom E types in public APIs.

  1. Advanced

If you have a bit more time, this covers all the time-saving ways you can customise and automate Outcome for various use cases, especially in larger codebases made up of multiple third party libraries.

  1. Custom payloads

Success-or-failure return types where extra information in addition to the error code accompanies failure.

  1. Result returning constructors

How to metaprogram construction of objects which use result to return failure instead of throwing a C++ exception.

  1. Hooking events

Intercepting useful events such as initial construction, copies and moves so you can capture backtraces, fire debug breakpoints etc.

  1. Interoperation

Interoperating with std::expected and other ValueOrError concept matching types.