Tutorial

  1. result<>

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

    1. Inspecting result
    2. TRY operations
  2. outcome<>

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

    1. Inspecting outcome
  3. No-value policies

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

    1. A custom no-value policy
    2. Built-in policies
  4. Custom payloads

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

    1. The Filesystem TS
    2. Upgrading the Filesystem TS
    3. Auto-throwing filesystem_error
  5. Result returning constructors

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

    1. Two phase construction
    2. A file handle
    3. Phase 2 construction
    4. Phase 3
    5. construct
    6. Alternatives
  6. Hooking events

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

    1. Keeping state
    2. ADL bridging
    3. Hook result
    4. Custom exception ptr
    5. Hook outcome
  7. Using result from C code

    Interacting with result returning C++ functions from C code.

    1. Limitations
    2. Example C++ function
    3. Calling it from C
    4. Variations
  8. Interoperation

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

    1. Incommensurate E types
    2. ValueOrError Concept
    3. The HTTP library
    4. The HTMLTidy library
    5. The File I/O library
    6. The Application
    7. Mapping the HTTP library into the Application 12
    8. Mapping the HTTP library into the Application 22
    9. Mapping the File I/O library into the Application
    10. Mapping the HTMLTidy library into the Application
    11. In use
    12. Conclusion