boostorg/leaf

Lightweight Error Augmentation Framework

C++

340

1,172 commits

updated Oct 13, 2026

See the code

README

LEAF

A lightweight error handling library for C++11.

Documentation

https://boostorg.github.io/leaf/

Features

  • Portable single-header format, no dependencies.
  • Tiny code size, configurable for embedded development.
  • No dynamic memory allocations, even with very large payloads.
  • Deterministic unbiased efficiency on the "happy" path and the "sad" path.
  • Error objects are handled in constant time, independent of call stack depth.
  • Can be used with or without exception handling.

Support

Distribution

Besides GitHub, there are two other distribution channels:

  • LEAF is included in official Boost releases, starting with Boost 1.75.
  • For maximum portability, the library is also available in single-header format: leaf.hpp.

Copyright 2018-2025 Emil Dotchevski and Reverge Studios, Inc. Distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].

cpp11
error-handling
header-only
low-latency
multi-platform
multi-threading
no-dependencies
single-header

boostorg/leaf

Lightweight Error Augmentation Framework

C++

340

1,172 commits

updated Oct 13, 2026

See the code

README

LEAF

A lightweight error handling library for C++11.

Documentation

https://boostorg.github.io/leaf/

Features

  • Portable single-header format, no dependencies.
  • Tiny code size, configurable for embedded development.
  • No dynamic memory allocations, even with very large payloads.
  • Deterministic unbiased efficiency on the "happy" path and the "sad" path.
  • Error objects are handled in constant time, independent of call stack depth.
  • Can be used with or without exception handling.

Support

Distribution

Besides GitHub, there are two other distribution channels:

  • LEAF is included in official Boost releases, starting with Boost 1.75.
  • For maximum portability, the library is also available in single-header format: leaf.hpp.

Copyright 2018-2025 Emil Dotchevski and Reverge Studios, Inc. Distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].

cpp11
error-handling
header-only
low-latency
multi-platform
multi-threading
no-dependencies
single-header

Significant stargazers

Douman

137 followers · starred Mar 2019

Yuri Khrustalev

70 followers · starred May 2024

Jason Dellaluce

162 followers · starred Oct 2024

Erik Rigtorp

1,302 followers · starred Jan 2020