Showing preview only (1,070K chars total). Download the full file or copy to clipboard to get everything.
Repository: zajo/leaf
Branch: master
Commit: 50fe0ed3d44d
Files: 185
Total size: 1012.5 KB
Directory structure:
gitextract_sux2q_ly/
├── .drone/
│ └── drone.sh
├── .drone.star
├── .gitattributes
├── .github/
│ └── workflows/
│ ├── ci.yml
│ └── gh-pages.yml
├── .gitignore
├── .travis.yml
├── .vscode/
│ ├── launch.json
│ └── tasks.json
├── CMakeLists.txt
├── LICENSE_1_0.txt
├── README.md
├── appveyor.yml
├── benchmark/
│ ├── b.bat
│ ├── b.sh
│ ├── benchmark.md
│ ├── deep_stack_leaf.cpp
│ └── deep_stack_other.cpp
├── conanfile.py
├── doc/
│ ├── Jamfile
│ ├── docinfo.html
│ ├── leaf-theme.yml
│ ├── leaf.adoc
│ ├── rouge-github.css
│ ├── whitepaper.md
│ ├── zajo-dark.css
│ └── zajo-light.css
├── example/
│ ├── asio_beast_leaf_rpc.cpp
│ ├── capture_in_exception.cpp
│ ├── capture_in_result.cpp
│ ├── error_log.cpp
│ ├── error_trace.cpp
│ ├── exception_to_result.cpp
│ ├── lua_callback_eh.cpp
│ ├── lua_callback_result.cpp
│ ├── print_file/
│ │ ├── print_file_eh.cpp
│ │ ├── print_file_outcome_result.cpp
│ │ ├── print_file_result.cpp
│ │ └── readme.md
│ ├── print_half.cpp
│ └── readme.md
├── gen/
│ └── generate_single_header.py
├── include/
│ └── boost/
│ ├── leaf/
│ │ ├── capture.hpp
│ │ ├── common.hpp
│ │ ├── config/
│ │ │ ├── tls.hpp
│ │ │ ├── tls_array.hpp
│ │ │ ├── tls_cpp11.hpp
│ │ │ ├── tls_freertos.hpp
│ │ │ └── tls_globals.hpp
│ │ ├── config.hpp
│ │ ├── context.hpp
│ │ ├── detail/
│ │ │ ├── all.hpp
│ │ │ ├── demangle.hpp
│ │ │ ├── function_traits.hpp
│ │ │ ├── mp11.hpp
│ │ │ ├── optional.hpp
│ │ │ └── print.hpp
│ │ ├── error.hpp
│ │ ├── exception.hpp
│ │ ├── handle_errors.hpp
│ │ ├── on_error.hpp
│ │ ├── pred.hpp
│ │ ├── result.hpp
│ │ └── to_variant.hpp
│ └── leaf.hpp
├── index.html
├── meson.build
├── meson_options.txt
├── meta/
│ └── libraries.json
├── subprojects/
│ ├── lua.wrap
│ └── tl_expected.wrap
├── test/
│ ├── BOOST_LEAF_ASSIGN_test.cpp
│ ├── BOOST_LEAF_AUTO_test.cpp
│ ├── BOOST_LEAF_CHECK_test.cpp
│ ├── Jamfile.v2
│ ├── _compile-fail-BOOST_LEAF_ASSIGN.cpp
│ ├── _compile-fail-BOOST_LEAF_AUTO.cpp
│ ├── _compile-fail-arg_boost_error_info_1.cpp
│ ├── _compile-fail-arg_boost_error_info_2.cpp
│ ├── _compile-fail-arg_catch_1.cpp
│ ├── _compile-fail-arg_catch_2.cpp
│ ├── _compile-fail-arg_match_1.cpp
│ ├── _compile-fail-arg_match_2.cpp
│ ├── _compile-fail-arg_rvalue_ref.cpp
│ ├── _compile-fail-diagnostic_info.cpp
│ ├── _compile-fail-error_info.cpp
│ ├── _compile-fail-exception_1.cpp
│ ├── _compile-fail-exception_2.cpp
│ ├── _compile-fail-new_error.cpp
│ ├── _compile-fail-result_1.cpp
│ ├── _compile-fail-result_2.cpp
│ ├── _compile-fail-result_3.cpp
│ ├── _compile-fail-result_4.cpp
│ ├── _compile-fail-verbose_diagnostic_info.cpp
│ ├── _hpp_capture_test.cpp
│ ├── _hpp_common_test.cpp
│ ├── _hpp_config_test.cpp
│ ├── _hpp_context_test.cpp
│ ├── _hpp_error_test.cpp
│ ├── _hpp_exception_test.cpp
│ ├── _hpp_handle_errors_test.cpp
│ ├── _hpp_leaf_test.cpp
│ ├── _hpp_on_error_test.cpp
│ ├── _hpp_pred_test.cpp
│ ├── _hpp_result_test.cpp
│ ├── _hpp_to_variant_test.cpp
│ ├── _test_ec.hpp
│ ├── _test_res.hpp
│ ├── accumulate_basic_test.cpp
│ ├── accumulate_nested_error_exception_test.cpp
│ ├── accumulate_nested_error_result_test.cpp
│ ├── accumulate_nested_new_error_exception_test.cpp
│ ├── accumulate_nested_new_error_result_test.cpp
│ ├── accumulate_nested_success_exception_test.cpp
│ ├── accumulate_nested_success_result_test.cpp
│ ├── boost/
│ │ └── core/
│ │ ├── current_function.hpp
│ │ └── lightweight_test.hpp
│ ├── boost_exception_test.cpp
│ ├── capture_exception_async_test.cpp
│ ├── capture_exception_result_async_test.cpp
│ ├── capture_exception_state_test.cpp
│ ├── capture_exception_unload_test.cpp
│ ├── capture_result_async_test.cpp
│ ├── capture_result_state_test.cpp
│ ├── capture_result_unload_test.cpp
│ ├── context_activator_test.cpp
│ ├── context_deduction_test.cpp
│ ├── ctx_handle_all_test.cpp
│ ├── ctx_handle_some_test.cpp
│ ├── ctx_remote_handle_all_test.cpp
│ ├── ctx_remote_handle_some_test.cpp
│ ├── defer_basic_test.cpp
│ ├── defer_nested_error_exception_test.cpp
│ ├── defer_nested_error_result_test.cpp
│ ├── defer_nested_new_error_exception_test.cpp
│ ├── defer_nested_new_error_result_test.cpp
│ ├── defer_nested_success_exception_test.cpp
│ ├── defer_nested_success_result_test.cpp
│ ├── diagnostic_info_test.cpp
│ ├── diagnostic_info_test2.cpp
│ ├── e_LastError_test.cpp
│ ├── e_errno_test.cpp
│ ├── error_code_test.cpp
│ ├── error_id_test.cpp
│ ├── exception_test.cpp
│ ├── exception_to_result_test.cpp
│ ├── function_traits_test.cpp
│ ├── handle_all_other_result_test.cpp
│ ├── handle_all_test.cpp
│ ├── handle_basic_test.cpp
│ ├── handle_some_other_result_test.cpp
│ ├── handle_some_test.cpp
│ ├── lightweight_test.hpp
│ ├── match_member_test.cpp
│ ├── match_test.cpp
│ ├── match_value_test.cpp
│ ├── multiple_errors_test.cpp
│ ├── optional_test.cpp
│ ├── preload_basic_test.cpp
│ ├── preload_exception_test.cpp
│ ├── preload_nested_error_exception_test.cpp
│ ├── preload_nested_error_result_test.cpp
│ ├── preload_nested_new_error_exception_test.cpp
│ ├── preload_nested_new_error_result_test.cpp
│ ├── preload_nested_success_exception_test.cpp
│ ├── preload_nested_success_result_test.cpp
│ ├── print_test.cpp
│ ├── result_bad_result_test.cpp
│ ├── result_implicit_conversion_test.cpp
│ ├── result_load_test.cpp
│ ├── result_ref_test.cpp
│ ├── result_state_test.cpp
│ ├── tls_array_alloc_test1.cpp
│ ├── tls_array_alloc_test2.cpp
│ ├── tls_array_alloc_test3.cpp
│ ├── tls_array_test.cpp
│ ├── to_variant_test.cpp
│ ├── try_catch_error_id_test.cpp
│ ├── try_catch_system_error_test.cpp
│ ├── try_catch_test.cpp
│ ├── try_exception_and_result_test.cpp
│ ├── visibility_test.cpp
│ ├── visibility_test_lib.cpp
│ └── visibility_test_lib.hpp
└── wasm.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .drone/drone.sh
================================================
#!/bin/bash
# Copyright 2020 Rene Rivera, Sam Darwin
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
set -e
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export REPO_NAME=$DRONE_REPO
export PATH=~/.local/bin:/usr/local/bin:$PATH
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
echo '==================================> INSTALL'
cd ..
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/build
git submodule update --init tools/inspect
git submodule update --init libs/config
git submodule update --init tools/boostdep
mkdir -p libs/leaf
cp -r $TRAVIS_BUILD_DIR/* libs/leaf
python tools/boostdep/depinst/depinst.py leaf -I example
./bootstrap.sh
./b2 headers
cd libs/leaf
echo '==================================> SCRIPT'
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
../../b2 test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
../../b2 exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
../../b2 threading=single test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
../../b2 threading=single exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
fi
================================================
FILE: .drone.star
================================================
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright Rene Rivera 2020.
# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={}
linuxglobalimage="cppalliance/droneubuntu1404:1"
windowsglobalimage="cppalliance/dronevs2019"
def main(ctx):
return [
osx_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD Job 1", "clang++", packages="", buildtype="boost", buildscript="drone", environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
osx_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD Job 2", "clang++", packages="", buildtype="boost", buildscript="drone", environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z,2a', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 3", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11.5", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 4", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 5", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 6", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 7", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11.1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 8", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="11", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 9", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="10.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 10", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1 Job 11", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="10.1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
linux_cxx("UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=11, Job 12", "g++-9", packages="g++-9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '11,14', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
linux_cxx("UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=17, Job 13", "g++-9", packages="g++-9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '17,2a', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-9 CXXSTD=11,14,17,2a Job 14", "g++-9", packages="g++-9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '11,14,17,2a', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-8 CXXSTD=11,14,17 Job 15", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '11,14,17', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=11,14 Job 16", "g++-7", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '11,14', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=11,14 Job 17", "g++-6", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '11,14', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=11,14 Job 18", "g++-5", packages="g++-5", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '11,14', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=11 Job 19", "g++-4.9", packages="g++-4.9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '11', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv),
linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXS Job 20", "clang++-8", packages="clang-8", llvm_os="trusty", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '11,14', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv),
linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXS Job 21", "clang++-8", packages="clang-8", llvm_os="trusty", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '17,2a', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-10 CXXSTD=11,1 Job 22", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '11,14,17,2a', 'DRONE_JOB_UUID': '12c6fc06c9'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-9 CXXSTD=11,14 Job 23", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '11,14,17,2a', 'DRONE_JOB_UUID': 'd435a6cdd7'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-8 CXXSTD=11,14 Job 24", "clang++-8", packages="clang-8", llvm_os="trusty", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '11,14,17,2a', 'DRONE_JOB_UUID': '4d134bc072'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-7 CXXSTD=11,14 Job 25", "clang++-7", packages="clang-7", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '11,14,17,2a', 'DRONE_JOB_UUID': 'f6e1126ced'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=11, Job 26", "clang++-6.0", packages="clang-6.0", llvm_os="trusty", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '11,14,17', 'DRONE_JOB_UUID': '887309d048'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=11, Job 27", "clang++-5.0", packages="clang-5.0", llvm_os="trusty", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'bc33ea4e26'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=11, Job 28", "clang++-4.0", packages="clang-4.0", llvm_os="trusty", llvm_ver="4.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '0a57cb53ba'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=11, Job 29", "clang++-3.9", packages="clang-3.9 libstdc++-4.9-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '7719a1c782'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=11, Job 30", "clang++-3.8", packages="clang-3.8 libstdc++-4.9-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '22d200f867'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=11, Job 31", "clang++-3.7", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': '632667547e'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=11, Job 32", "clang++-3.6", packages="clang-3.6 libstdc++-4.9-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'cb4e5208b4'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=11, Job 33", "clang++-3.5", packages="clang-3.5 libstdc++-4.9-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '11,14,1z', 'DRONE_JOB_UUID': 'b6692ea5df'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 34", "/usr/bin/clang++", packages="clang-3.4", llvm_os="precise", llvm_ver="3.8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': '/usr/bin/clang++', 'CXXSTD': '11', 'DRONE_JOB_UUID': 'f1f836cb4e'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 35", "/usr/bin/clang++", packages="clang-3.3", llvm_os="precise", llvm_ver="3.8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': '/usr/bin/clang++', 'CXXSTD': '11', 'DRONE_JOB_UUID': '972a67c481'}, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
================================================
FILE: .gitattributes
================================================
* text=auto !eol svneol=native#text/plain
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=native#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl
*.pm text svneol=native#text/x-perl
*.py text svneol=native#text/x-python
*.sh eol=lf svneol=LF#text/x-sh
configure eol=lf svneol=LF#text/x-sh
# Image formats
*.bmp binary svneol=unset#image/bmp
*.gif binary svneol=unset#image/gif
*.ico binary svneol=unset#image/ico
*.jpeg binary svneol=unset#image/jpeg
*.jpg binary svneol=unset#image/jpeg
*.png binary svneol=unset#image/png
*.tif binary svneol=unset#image/tiff
*.tiff binary svneol=unset#image/tiff
*.svg text svneol=native#image/svg%2Bxml
# Data formats
*.pdf binary svneol=unset#application/pdf
*.avi binary svneol=unset#video/avi
*.doc binary svneol=unset#application/msword
*.dsp text svneol=crlf#text/plain
*.dsw text svneol=crlf#text/plain
*.eps binary svneol=unset#application/postscript
*.gz binary svneol=unset#application/gzip
*.mov binary svneol=unset#video/quicktime
*.mp3 binary svneol=unset#audio/mpeg
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
*.ps binary svneol=unset#application/postscript
*.psd binary svneol=unset#application/photoshop
*.rdf binary svneol=unset#text/rdf
*.rss text svneol=unset#text/xml
*.rtf binary svneol=unset#text/rtf
*.sln text svneol=native#text/plain
*.swf binary svneol=unset#application/x-shockwave-flash
*.tgz binary svneol=unset#application/gzip
*.vcproj text svneol=native#text/xml
*.vcxproj text svneol=native#text/xml
*.vsprops text svneol=native#text/xml
*.wav binary svneol=unset#audio/wav
*.xls binary svneol=unset#application/vnd.ms-excel
*.zip binary svneol=unset#application/zip
# Text formats
.htaccess text svneol=native#text/plain
*.bbk text svneol=native#text/xml
*.cmake text svneol=native#text/plain
*.css text svneol=native#text/css
*.dtd text svneol=native#text/xml
*.htm text svneol=native#text/html
*.html text svneol=native#text/html
*.ini text svneol=native#text/plain
*.log text svneol=native#text/plain
*.mak text svneol=native#text/plain
*.qbk text svneol=native#text/plain
*.rst text svneol=native#text/plain
*.sql text svneol=native#text/x-sql
*.txt text svneol=native#text/plain
*.xhtml text svneol=native#text/xhtml%2Bxml
*.xml text svneol=native#text/xml
*.xsd text svneol=native#text/xml
*.xsl text svneol=native#text/xml
*.xslt text svneol=native#text/xml
*.xul text svneol=native#text/xul
*.yml text svneol=native#text/plain
boost-no-inspect text svneol=native#text/plain
CHANGES text svneol=native#text/plain
COPYING text svneol=native#text/plain
INSTALL text svneol=native#text/plain
Jamfile text svneol=native#text/plain
Jamroot text svneol=native#text/plain
Jamfile.v2 text svneol=native#text/plain
Jamrules text svneol=native#text/plain
Makefile* text svneol=native#text/plain
README text svneol=native#text/plain
TODO text svneol=native#text/plain
# Code formats
*.c text svneol=native#text/plain
*.cpp text svneol=native#text/plain
*.h text svneol=native#text/plain
*.hpp text svneol=native#text/plain
*.ipp text svneol=native#text/plain
*.tpp text svneol=native#text/plain
*.jam text svneol=native#text/plain
*.java text svneol=native#text/plain
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- toolset: gcc-4.8
cxxstd: "11"
os: ubuntu-18.04
install: g++-4.8
- toolset: gcc-5
cxxstd: "11,14,1z"
os: ubuntu-18.04
install: g++-5
- toolset: gcc-6
cxxstd: "11,14,1z"
os: ubuntu-18.04
install: g++-6
- toolset: gcc-7
cxxstd: "11,14"
os: ubuntu-18.04
- toolset: gcc-8
cxxstd: "11,14,17,2a"
os: ubuntu-18.04
install: g++-8
- toolset: gcc-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
- toolset: gcc-10
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: g++-10
- toolset: gcc-11
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: g++-11
- toolset: clang
compiler: clang++-3.9
cxxstd: "11,14"
os: ubuntu-18.04
install: clang-3.9
- toolset: clang
compiler: clang++-4.0
cxxstd: "11,14"
os: ubuntu-18.04
install: clang-4.0
- toolset: clang
compiler: clang++-5.0
cxxstd: "11,14,1z"
os: ubuntu-18.04
install: clang-5.0
- toolset: clang
compiler: clang++-6.0
cxxstd: "11,14,17"
os: ubuntu-18.04
install: clang-6.0
- toolset: clang
compiler: clang++-7
cxxstd: "11,14,17"
os: ubuntu-18.04
install: clang-7
- toolset: clang
compiler: clang++-8
cxxstd: "11,14,17"
os: ubuntu-20.04
install: clang-8
- toolset: clang
compiler: clang++-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: clang-10
- toolset: clang
compiler: clang++-11
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: clang-11
- toolset: clang
compiler: clang++-12
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
install: clang-12
- toolset: clang
cxxstd: "11,14,17,2a"
os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/leaf
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" leaf
./bootstrap.sh
./b2 -d0 headers
- name: Create user-config.jam
if: matrix.compiler
run: |
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
- name: Generate headers
run: |
cd ../boost-root/libs/leaf
python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p include -o test/leaf.hpp boost/leaf
- name: Run tests
run: |
cd ../boost-root
./b2 -j3 libs/leaf/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} link=shared,static variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.2
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2019
- toolset: gcc
cxxstd: "11,14,17,2a"
addrmd: 64
os: windows-2019
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup Boost
shell: cmd
run: |
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
if "%GITHUB_BASE_REF%" == "master" set BOOST_BRANCH=master
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\leaf\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" leaf
cmd /c bootstrap
b2 -d0 headers
- name: Generate headers
run: |
cd ../boost-root/libs/leaf
python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p include -o test/leaf.hpp boost/leaf
- name: Run tests
shell: cmd
run: |
cd ../boost-root
b2 -j3 libs/leaf/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release,leaf_debug_capture0,leaf_release_capture0,leaf_debug_diag0,leaf_release_diag0,leaf_debug_embedded,leaf_release_embedded,leaf_debug_leaf_hpp,leaf_release_leaf_hpp
================================================
FILE: .github/workflows/gh-pages.yml
================================================
name: documentation
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install packages
run: |
sudo gem install asciidoctor asciidoctor-pdf rouge
- name: Setup Boost
run: |
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/leaf
git submodule update --init tools/build
git submodule update --init libs/config
./bootstrap.sh
- name: Create user-config.jam
run: |
echo "using asciidoctor ;" > ~/user-config.jam
- name: Build documentation
run: |
cd ../boost-root/libs/leaf/doc
../../../b2
- name: Generate single header
run: |
REF=$(git show-ref $GITHUB_REF --hash)
cd ../boost-root/libs/leaf
python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p include -o doc/html/leaf.hpp boost/leaf --hash "$REF"
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ../boost-root/libs/leaf/doc/html
================================================
FILE: .gitignore
================================================
.DS_Store
.Trashes
*.suo
*.user
*.log
*.sdf
*.opensdf
*.db
*.opendb
bld/*
doc/html/*
snippets/*
subprojects/*/
.vscode/ipch/*
.vscode/settings.json
.vscode/c_cpp_properties.json
benchmark/tl/*
test/leaf.hpp
doc/leaf.html
================================================
FILE: .travis.yml
================================================
# Copyright 2016-2018 Peter Dimov
# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
sudo: false
dist: trusty
python: "2.7"
os:
- linux
- osx
branches:
only:
- master
- develop
- /^feature.*/
env:
matrix:
- BOGUS_JOB=true
addons:
apt:
packages:
- g++-4.9
- g++-5
- g++-6
- clang-3.6
- clang-3.7
- clang-3.8
- ruby-full
- ninja-build
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
- llvm-toolchain-precise-3.6
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise-3.8
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
env: DOC=1
install:
- gem install asciidoctor
- gem install asciidoctor-pdf --pre
- gem install rouge
- cd ..
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
- mkdir -p libs/leaf
- cp -r $TRAVIS_BUILD_DIR/* libs/leaf
- ./bootstrap.sh
- cd libs/leaf
script:
- |-
echo "using asciidoctor ;" > ~/user-config.jam
- ../../b2 doc
deploy:
local-dir: ../boost-root/libs/leaf/doc/html
provider: pages
skip-cleanup: true
github-token: $GH_PAGES_TOKEN
keep-history: false
on:
branch: master
###################################
- os: osx
compiler: clang++
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=11,14 UBSAN_OPTIONS=print_stacktrace=1
- os: osx
compiler: clang++
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=1z,2a UBSAN_OPTIONS=print_stacktrace=1
- os: osx
osx_image: xcode11.5
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode11.4
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode11.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode11.2
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode11.1
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode11
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode10.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode10.2
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
- os: osx
osx_image: xcode10.1
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11,14,1z
###################################
- os: linux
compiler: g++-9
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=11,14 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=11,14,17,2a
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=11,14,17
addons:
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=11,14
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=11,14
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=11,14
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.9
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=11
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
###################################
- os: linux
compiler: clang++-8
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXSTD=11,14 UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux
compiler: clang++-8
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXSTD=17,2a UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux
dist: xenial
compiler: clang++-10
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=11,14,17,2a
addons:
apt:
packages:
- clang-10
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
dist: xenial
compiler: clang++-9
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=11,14,17,2a
addons:
apt:
packages:
- clang-9
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
compiler: clang++-8
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=11,14,17,2a
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux
compiler: clang++-7
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=11,14,17,2a
addons:
apt:
packages:
- clang-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
- os: linux
compiler: clang++-6.0
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=11,14,17
addons:
apt:
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- os: linux
compiler: clang++-5.0
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-5.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
- os: linux
compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- os: linux
compiler: clang++-3.9
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-3.9
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.8
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-3.8
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux
compiler: clang++-3.6
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-3.6
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=11,14,1z
addons:
apt:
packages:
- clang-3.5
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=11
addons:
apt:
packages:
- clang-3.4
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=11
addons:
apt:
packages:
- clang-3.3
###################################
install:
- cd ..
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init tools/inspect
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- mkdir -p libs/leaf
- cp -r $TRAVIS_BUILD_DIR/* libs/leaf
- python tools/boostdep/depinst/depinst.py leaf -I example
- ./bootstrap.sh
- ./b2 headers
- cd libs/leaf
script:
- |-
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
- ../../b2 test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
- ../../b2 exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
- ../../b2 threading=single test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
- ../../b2 threading=single exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release,leaf_debug_diag0,leaf_release_diag0 ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
notifications:
email:
on_success: always
================================================
FILE: .vscode/launch.json
================================================
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bld/debug/capture_exception_async_test",
"args": [ ],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"externalConsole": false,
"MIMode": "lldb"
}
]
}
================================================
FILE: .vscode/tasks.json
================================================
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Configure Meson build directories",
"type": "shell",
"command": "cd ${workspaceRoot} && meson -D leaf_boost_examples=true -D leaf_lua_examples=true bld/debug && meson -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true bld/debug_leaf_hpp && meson -D leaf_boost_examples=true -D leaf_lua_examples=true bld/release --buildtype release && meson -D leaf_boost_examples=true -D leaf_lua_examples=true -D leaf_hpp=true bld/release_leaf_hpp --buildtype release && meson -D leaf_diagnostics=0 -D cpp_eh=none -D b_ndebug=true -D b_lto=true -D leaf_enable_benchmarks=true bld/benchmark --buildtype release",
"problemMatcher": []
},
{
"label": "Configure Meson build directories (no Boost)",
"type": "shell",
"command": "cd ${workspaceRoot} && meson -D leaf_lua_examples=true bld/debug && meson -D leaf_lua_examples=true -D leaf_hpp=true bld/debug_leaf_hpp && meson -D leaf_lua_examples=true bld/release --buildtype release && meson -D leaf_lua_examples=true -D leaf_hpp=true bld/release_leaf_hpp --buildtype release",
"problemMatcher": []
},
{
"label": "Generate leaf.hpp",
"type": "shell",
"command": "cd ${workspaceRoot} && python gen/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p ${workspaceRoot}/include -o ${workspaceRoot}/test/leaf.hpp boost/leaf",
"problemMatcher": []
},
{
"group": {
"kind": "build",
"isDefault": true
},
"label": "Build all unit tests and examples (debug)",
"type": "shell",
"command": "cd ${workspaceRoot}/bld/debug && ninja",
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"relative",
"${workspaceRoot}/bld/debug"
]
}
},
{
"group": "test",
"label": "Run all unit tests (debug)",
"type": "shell",
"dependsOn": [
"Generate leaf.hpp"
],
"command": "cd ${workspaceRoot}/bld/debug_leaf_hpp && ninja && meson test && cd ${workspaceRoot}/bld/debug && ninja && meson test",
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"relative",
"${workspaceRoot}/bld/debug"
]
}
},
{
"group": "test",
"label": "Run all unit tests (release)",
"type": "shell",
"dependsOn": [
"Generate leaf.hpp"
],
"command": "cd ${workspaceRoot}/bld/release && ninja && meson test && cd ${workspaceRoot}/bld/release_leaf_hpp && ninja && meson test",
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"relative",
"${workspaceRoot}/bld/release"
]
}
},
{
"group": "test",
"label": "Run all unit tests (b2, all configurations)",
"type": "shell",
"dependsOn": [
"Generate leaf.hpp"
],
"command": "../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp exception-handling=on,off cxxstd=11,14,1z,17 && ../../b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=11,14,1z,17",
"windows": {
"command": "..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp exception-handling=on,off cxxstd=14,17,latest && ..\\..\\b2 test link=shared,static variant=debug,release,leaf_debug_diag0,leaf_release_diag0,leaf_debug_leaf_hpp,leaf_release_leaf_hpp,leaf_debug_embedded,leaf_release_embedded exception-handling=off rtti=off cxxstd=14,17,latest",
},
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"relative",
"${workspaceRoot}/bld/release"
]
}
},
{
"group": {
"kind": "test",
"isDefault": true
},
"label": "Test current editor file",
"type": "shell",
"command": "cd ${workspaceRoot}/bld/debug && ninja && { meson test ${fileBasenameNoExtension} || cat ./meson-logs/testlog.txt }",
"problemMatcher": {
"base": "$gcc",
"fileLocation": [
"relative",
"${workspaceRoot}/bld/debug"
]
}
}
]
}
================================================
FILE: CMakeLists.txt
================================================
# Generated by `boostdep --cmake leaf`
# Copyright 2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_leaf VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_leaf INTERFACE)
add_library(Boost::leaf ALIAS boost_leaf)
target_include_directories(boost_leaf INTERFACE include)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
================================================
FILE: LICENSE_1_0.txt
================================================
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# 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 when configured 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
* [cpplang on Slack](https://Cpplang.slack.com) (use the `#boost` channel)
* [Boost Users Mailing List](https://lists.boost.org/mailman/listinfo.cgi/boost-users)
* [Boost Developers Mailing List](https://lists.boost.org/mailman/listinfo.cgi/boost)
## Distribution
Besides GitHub, there are two other distribution channels:
* LEAF is included in official [Boost](https://www.boost.org/) releases, starting with Boost 1.75.
* For maximum portability, the library is also available in single-header format: simply download [leaf.hpp](https://boostorg.github.io/leaf/leaf.hpp) (direct download link).
Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc. Distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].
================================================
FILE: appveyor.yml
================================================
# Copyright 2016, 2017 Peter Dimov
# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1,clang-win
CXXSTD: 14,17
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: msvc-14.2
CXXSTD: 14,17
install:
- set BOOST_BRANCH=develop
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
- cd ..
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init tools/boost_install
- git submodule update --init libs/config
- git submodule update --init libs/headers
- git submodule update --init tools/boostdep
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\leaf\
- python tools/boostdep/depinst/depinst.py leaf
- cmd /c bootstrap
- b2 headers
build: off
test_script:
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- b2 -j3 libs/leaf/test toolset=%TOOLSET% exception-handling=on,off variant=debug,release,leaf_debug_diag0,leaf_release_diag0 define=_CRT_SECURE_NO_WARNINGS %CXXSTD%
================================================
FILE: benchmark/b.bat
================================================
ninja
del benchmark.csv
deep_stack_leaf
deep_stack_tl
deep_stack_result
deep_stack_outcome
================================================
FILE: benchmark/b.sh
================================================
ninja
rm benchmark.csv
./deep_stack_leaf
./deep_stack_tl
./deep_stack_result
./deep_stack_outcome
================================================
FILE: benchmark/benchmark.md
================================================
# Benchmark
The LEAF github repository contains two similar benchmarking programs, one using LEAF, the other configurable to use `tl::expected` or Boost Outcome, that simulate transporting error objects across 10 levels of stack frames, measuring the performance of the three libraries.
Links:
* LEAF: https://boostorg.github.io/leaf
* `tl::expected`: https://github.com/TartanLlama/expected
* Boost Outcome V2: https://www.boost.org/doc/libs/release/libs/outcome/doc/html/index.html
## Library design considerations
LEAF serves a similar purpose to other error handling libraries, but its design is very different. The benchmarks are comparing apples and oranges.
The main design difference is that when using LEAF, error objects are not communicated in return values. In case of a failure, the `leaf::result<T>` object transports only an `int`, the unique error ID.
Error objects skip the error neutral functions in the call stack and get moved directly to the the error handling scope that needs them. This mechanism does not depend on RVO or any other optimization: as soon as the program passes an error object to LEAF, it moves it to the correct error handling scope.
Other error handling libraries instead couple the static type of the return value of *all* error neutral functions with the error type an error reporting function may return. This approach suffers from the same problems as statically-enforced exception specifications:
* It's difficult to use in polymorphic function calls, and
* It impedes interoperability between the many different error types any non-trivial program must handle.
(The Boost Outcome library is also capable of avoiding such excessive coupling, by passing for the third `P` argument in the `outcome<T, E, P>` template a pointer that erases the exact static type of the object being transported. However, this would require a dynamic memory allocation).
## Syntax
The most common check-only use case looks almost identically in LEAF and in Boost Outcome (`tl::expected` lacks a similar macro):
```c++
// Outcome
{
BOOST_OUTCOME_TRY(v, f()); // Check for errors, forward failures to the caller
// If control reaches here, v is the successful result (the call succeeded).
}
```
```c++
// LEAF
{
BOOST_LEAF_AUTO(v, f()); // Check for errors, forward failures to the caller
// If control reaches here, v is the successful result (the call succeeded).
}
```
When we want to handle failures, in Boost Outcome and in `tl::expected`, accessing the error object (which is always stored in the return value) is a simple continuation of the error check:
```c++
// Outcome, tl::expected
if( auto r = f() )
{
auto v = r.value();
// No error, use v
}
else
{ // Error!
switch( r.error() )
{
error_enum::error1:
/* handle error_enum::error1 */
break;
error_enum::error2:
/* handle error_enum::error2 */
break;
default:
/* handle any other failure */
}
}
```
When using LEAF, we must explicitly state our intention to handle errors, not just check for failures:
```c++
// LEAF
leaf::try_handle_all
[]() -> leaf::result<T>
{
BOOST_LEAF_AUTO(v, f());
// No error, use v
},
[]( leaf::match<error_enum, error_enum::error1> )
{
/* handle error_enum::error1 */
},
[]( leaf::match<error_enum, error_enum::error2> )
{
/* handle error_enum::error2 */
},
[]
{
/* handle any other failure */
} );
```
The use of `try_handle_all` reserves storage on the stack for the error object types being handled (in this case, `error_enum`). If the failure is either `error_enum::error1` or `error_enum::error2`, the matching error handling lambda is invoked.
## Code generation considerations
Benchmarking C++ programs is tricky, because we want to prevent the compiler from optimizing out things it shouldn't normally be able to optimize in a real program, yet we don't want to interfere with "legitimate" optimizations.
The primary approach we use to prevent the compiler from optimizing everything out to nothing is to base all computations on a call to `std::rand()`.
When benchmarking error handling, it makes sense to measure the time it takes to return a result or error across multiple stack frames. This calls for disabling inlining.
The technique used to disable inlining in this benchmark is to mark functions with `__attribute__((noinline))`. This is imperfect, because optimizers can still peek into the body of the function and optimize things out, as is seen in this example:
```c++
__attribute__((noinline)) int val() {return 42;}
int main()
{
return val();
}
```
Which on clang 9 outputs:
```x86asm
val():
mov eax, 42
ret
main:
mov eax, 42
ret
```
It does not appear that anything like this is occurring in our case, but it is still a possibility.
> NOTES:
>
> - The benchmarks are compiled with exception handling disabled.
> - LEAF is able to work with external `result<>` types. The benchmark uses `leaf::result<T>`.
## Show me the code!
The following source:
```C++
leaf::result<int> f();
leaf::result<int> g()
{
BOOST_LEAF_AUTO(x, f());
return x+1;
}
```
Generates this code on clang ([Godbolt](https://godbolt.org/z/v58drTPhq)):
```x86asm
g(): # @g()
push rbx
sub rsp, 32
mov rbx, rdi
lea rdi, [rsp + 8]
call f()
mov eax, dword ptr [rsp + 24]
mov ecx, eax
and ecx, 3
cmp ecx, 3
jne .LBB0_1
mov eax, dword ptr [rsp + 8]
add eax, 1
mov dword ptr [rbx], eax
mov eax, 3
jmp .LBB0_3
.LBB0_1:
cmp ecx, 2
jne .LBB0_3
mov rax, qword ptr [rsp + 8]
mov qword ptr [rbx], rax
mov rax, qword ptr [rsp + 16]
mov qword ptr [rbx + 8], rax
mov eax, 2
.LBB0_3:
mov dword ptr [rbx + 16], eax
mov rax, rbx
add rsp, 32
pop rbx
ret
```
> Description:
>
> * The happy path can be recognized by the `add eax, 1` instruction generated for `x + 1`.
>
> * `.LBB0_3`: Regular failure; the returned `result<T>` object holds only the `int` discriminant.
>
> * `.LBB0_1`: Failure; the returned `result<T>` holds the `int` discriminant and a `std::shared_ptr<leaf::polymorphic_context>` (used to hold error objects transported from another thread).
Note that `f` is undefined, hence the `call` instruction. Predictably, if we provide a trivial definition for `f`:
```C++
leaf::result<int> f()
{
return 42;
}
leaf::result<int> g()
{
BOOST_LEAF_AUTO(x, f());
return x+1;
}
```
We get:
```x86asm
g(): # @g()
mov rax, rdi
mov dword ptr [rdi], 43
mov dword ptr [rdi + 16], 3
ret
```
With a less trivial definition of `f`:
```C++
leaf::result<int> f()
{
if( rand()%2 )
return 42;
else
return leaf::new_error();
}
leaf::result<int> g()
{
BOOST_LEAF_AUTO(x, f());
return x+1;
}
```
We get ([Godbolt](https://godbolt.org/z/87Kezzrs4)):
```x86asm
g(): # @g()
push rbx
mov rbx, rdi
call rand
test al, 1
jne .LBB1_2
mov eax, 4
lock xadd dword ptr [rip + boost::leaf::leaf_detail::id_factory<void>::counter], eax
add eax, 4
mov dword ptr fs:[boost::leaf::leaf_detail::id_factory<void>::current_id@TPOFF], eax
and eax, -4
or eax, 1
mov dword ptr [rbx + 16], eax
mov rax, rbx
pop rbx
ret
.LBB1_2:
mov dword ptr [rbx], 43
mov eax, 3
mov dword ptr [rbx + 16], eax
mov rax, rbx
pop rbx
ret
```
Above, the call to `f()` is inlined:
* `.LBB1_2`: Success
* The atomic `add` is from the initial error reporting machinery in LEAF, generating a unique error ID for the error being reported.
## Benchmark matrix dimensions
The benchmark matrix has 2 dimensions:
1. Error object type:
a. The error object transported in case of a failure is of type `e_error_code`, which is a simple `enum`.
b. The error object transported in case of a failure is of type `struct e_system_error { e_error_code value; std::string what; }`.
c. The error object transported in case of a failure is of type `e_heavy_payload`, a `struct` of size 4096.
2. Error rate: 2%, 98%
Now, transporting a large error object might seem unusual, but this is only because it is impractical to return a large object as *the* return value in case of an error. LEAF has two features that make communicating any, even large error objects, practical:
* The return type of error neutral functions is not coupled with the error object types that may be reported. This means that in case of a failure, any function can easily contribute any error information it has available.
* LEAF will only bother with transporting a given error object if an active error handling scope needs it. This means that library functions can and should contribute any and all relevant information when reporting a failure, because if the program doesn't need it, it will simply be discarded.
## Source code
[deep_stack_leaf.cpp](deep_stack_leaf.cpp)
[deep_stack_other.cpp](deep_stack_other.cpp)
## Godbolt
Godbolt has built-in support for Boost (Outcome/LEAF), but `tl::expected` both provide a single header, which makes it very easy to use them online as well. To see the generated code for the benchmark program, you can copy and paste the following into Godbolt:
`leaf::result<T>` ([godbolt](https://godbolt.org/z/1hqqnfhMf))
```c++
#include "https://raw.githubusercontent.com/boostorg/leaf/master/benchmark/deep_stack_leaf.cpp"
```
`tl::expected<T, E>` ([godbolt](https://godbolt.org/z/6dfcdsPcc))
```c++
#include "https://raw.githubusercontent.com/TartanLlama/expected/master/include/tl/expected.hpp"
#include "https://raw.githubusercontent.com/boostorg/leaf/master/benchmark/deep_stack_other.cpp"
```
`outcome::result<T, E>` ([godbolt](https://godbolt.org/z/jMEfGMrW9))
```c++
#define BENCHMARK_WHAT 1
#include "https://raw.githubusercontent.com/boostorg/leaf/master/benchmark/deep_stack_other.cpp"
```
## Build options
To build both versions of the benchmark program, the compilers are invoked using the following command line options:
* `-std=c++17`: Required by other libraries (LEAF only requires C++11);
* `-fno-exceptions`: Disable exception handling;
* `-O3`: Maximum optimizations;
* `-DNDEBUG`: Disable asserts.
In addition, the LEAF version is compiled with:
* `-DBOOST_LEAF_CFG_DIAGNOSTICS=0`: Disable diagnostic information for error objects not recognized by the program. This is a debugging feature, see [Configuration Macros](https://boostorg.github.io/leaf/#configuration).
## Results
Below is the output the benchmark programs running on an old MacBook Pro. The tables show the elapsed time for 10,000,000 iterations of returning a result across 10 stack frames, depending on the error type and the rate of failures. In addition, the programs generate a `benchmark.csv` file in the current working directory.
### gcc 9.2.0:
`leaf::result<T>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 594965 | 545882
e_system_error | 614688 | 1203154
e_heavy_payload | 736701 | 7397756
`tl::expected<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 921410 | 820757
e_system_error | 670191 | 5593513
e_heavy_payload | 1331724 | 31560432
`outcome::result<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 1080512 | 773206
e_system_error | 577403 | 1201693
e_heavy_payload | 13222387 | 32104693
`outcome::outcome<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 832916 | 1170731
e_system_error | 947298 | 2330392
e_heavy_payload | 13342292 | 33837583
### clang 11.0.0:
`leaf::result<T>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 570847 | 493538
e_system_error | 592685 | 982799
e_heavy_payload | 713966 | 5144523
`tl::expected<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 461639 | 312849
e_system_error | 620479 | 3534689
e_heavy_payload | 1037434 | 16078669
`outcome::result<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 431219 | 446854
e_system_error | 589456 | 1712739
e_heavy_payload | 12387405 | 16216894
`outcome::outcome<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 711412 | 1477505
e_system_error | 835691 | 2374919
e_heavy_payload | 13289404 | 29785353
### msvc 19.24.28314:
`leaf::result<T>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 1205327 | 1449117
e_system_error | 1290277 | 2332414
e_heavy_payload | 1503103 | 13682308
`tl::expected<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 938839 | 867296
e_system_error | 1455627 | 8943881
e_heavy_payload | 2637494 | 49212901
`outcome::result<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 935331 | 1202475
e_system_error | 1228944 | 2269680
e_heavy_payload | 15239084 | 55618460
`outcome::outcome<T, E>`:
Error type | 2% (μs) | 98% (μs)
----------------|---------:|--------:
e_error_code | 1472035 | 2529057
e_system_error | 1997971 | 4004965
e_heavy_payload | 16027423 | 64572924
## Charts
The charts below are generated from the results from the previous section, converted from elapsed time in microseconds to millions of calls per second.
### gcc 9.2.0:



### clang 11.0.0:



### msvc 19.24.28314:



## Thanks
Thanks for the valuable feedback: Peter Dimov, Glen Fernandes, Sorin Fetche, Niall Douglas, Ben Craig, Vinnie Falco, Jason Dictos
================================================
FILE: benchmark/deep_stack_leaf.cpp
================================================
// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See benchmark.md
#include <boost/leaf.hpp>
#ifndef BOOST_LEAF_NO_EXCEPTIONS
# error Please disable exception handling.
#endif
#if BOOST_LEAF_CFG_DIAGNOSTICS
# error Please disable diagnostics.
#endif
#ifdef _MSC_VER
# define NOINLINE __declspec(noinline)
# define ALWAYS_INLINE __forceinline
#else
# define NOINLINE __attribute__((noinline))
# define ALWAYS_INLINE __attribute__((always_inline)) inline
#endif
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <chrono>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <numeric>
#include <algorithm>
#include <system_error>
#include <array>
namespace boost
{
[[noreturn]] void throw_exception( std::exception const & e )
{
std::cerr << "Terminating due to a C++ exception under BOOST_LEAF_NO_EXCEPTIONS: " << e.what();
std::terminate();
}
struct source_location;
[[noreturn]] void throw_exception( std::exception const & e, boost::source_location const & )
{
throw_exception(e);
}
}
//////////////////////////////////////
namespace leaf = boost::leaf;
#define USING_RESULT_TYPE "leaf::result<T>"
//////////////////////////////////////
enum class e_error_code
{
ec0, ec1, ec2, ec3
};
struct e_system_error
{
int value;
std::string what;
};
struct e_heavy_payload
{
std::array<char, 4096> value;
};
template <class E>
leaf::error_id make_error() noexcept;
template <>
inline leaf::error_id make_error<e_error_code>() noexcept
{
switch(std::rand()%4)
{
default: return leaf::new_error(e_error_code::ec0);
case 1: return leaf::new_error(e_error_code::ec1);
case 2: return leaf::new_error(e_error_code::ec2);
case 3: return leaf::new_error(e_error_code::ec3);
}
}
template <>
inline leaf::error_id make_error<std::error_code>() noexcept
{
return std::error_code(std::rand(), std::system_category());
}
template <>
inline leaf::error_id make_error<e_system_error>() noexcept
{
return leaf::new_error( e_system_error { std::rand(), std::string(std::rand()%32, ' ') } );
}
template <>
inline leaf::error_id make_error<e_heavy_payload>() noexcept
{
e_heavy_payload e;
std::fill(e.value.begin(), e.value.end(), std::rand());
return leaf::new_error(e);
}
inline bool should_fail( int failure_rate ) noexcept
{
assert(failure_rate>=0);
assert(failure_rate<=100);
return (std::rand()%100) < failure_rate;
}
inline int handle_error( e_error_code e ) noexcept
{
return int(e);
}
inline int handle_error( std::error_code const & e ) noexcept
{
return e.value();
}
inline int handle_error( e_system_error const & e ) noexcept
{
return e.value + e.what.size();
}
inline int handle_error( e_heavy_payload const & e ) noexcept
{
return std::accumulate(e.value.begin(), e.value.end(), 0);
}
//////////////////////////////////////
// This is used to change the "success" type at each level.
// Generally, functions return values of different types.
template <int N, class E, bool Odd = N%2>
struct select_result_type;
template <int N, class E>
struct select_result_type<N, E, true>
{
using type = leaf::result<int>; // Does not depend on E
};
template <int N, class E>
struct select_result_type<N, E, false>
{
using type = leaf::result<float>; // Does not depend on E
};
template <int N, class E>
using select_result_t = typename select_result_type<N, E>::type;
//////////////////////////////////////
template <int N, class E>
struct benchmark
{
using e_type = E;
NOINLINE static select_result_t<N, E> f( int failure_rate ) noexcept
{
BOOST_LEAF_AUTO(x, (benchmark<N-1, E>::f(failure_rate)));
return x+1;
}
};
template <class E>
struct benchmark<1, E>
{
using e_type = E;
NOINLINE static select_result_t<1, E> f( int failure_rate ) noexcept
{
if( should_fail(failure_rate) )
return make_error<E>();
else
return std::rand();
}
};
//////////////////////////////////////
template <class Benchmark>
NOINLINE int runner( int failure_rate ) noexcept
{
return leaf::try_handle_all(
[=]
{
return Benchmark::f(failure_rate);
},
[]( typename Benchmark::e_type const & e )
{
return handle_error(e);
},
[]
{
return -1;
} );
}
//////////////////////////////////////
std::fstream append_csv()
{
if( FILE * f = fopen("benchmark.csv","rb") )
{
fclose(f);
return std::fstream("benchmark.csv", std::fstream::out | std::fstream::app);
}
else
{
std::fstream fs("benchmark.csv", std::fstream::out | std::fstream::app);
fs << "\"Result Type\",2%,98%\n";
return fs;
}
}
template <class F>
int print_elapsed_time( int iteration_count, F && f )
{
auto start = std::chrono::steady_clock::now();
int val = 0;
for( int i = 0; i!=iteration_count; ++i )
val += std::forward<F>(f)();
auto stop = std::chrono::steady_clock::now();
int elapsed = std::chrono::duration_cast<std::chrono::microseconds>(stop-start).count();
std::cout << std::right << std::setw(9) << elapsed;
append_csv() << ',' << elapsed;
return val;
}
//////////////////////////////////////
template <int Depth, class E>
int benchmark_type( char const * type_name, int iteration_count )
{
int x=0;
append_csv() << "\"" USING_RESULT_TYPE "\"";
std::cout << '\n' << std::left << std::setw(16) << type_name << '|';
std::srand(0);
x += print_elapsed_time( iteration_count, [] { return runner<benchmark<Depth, E>>(2); } );
std::cout << " |";
std::srand(0);
x += print_elapsed_time( iteration_count, [] { return runner<benchmark<Depth, E>>(98); } );
append_csv() << '\n';
return x;
}
//////////////////////////////////////
int main()
{
int const depth = 10;
int const iteration_count = 10000000;
std::cout <<
iteration_count << " iterations, call depth " << depth << ", sizeof(e_heavy_payload) = " << sizeof(e_heavy_payload) << "\n"
USING_RESULT_TYPE "\n"
"Error type | 2% (μs) | 98% (μs)\n"
"----------------|----------|---------";
int r = 0;
r += benchmark_type<depth, e_error_code>("e_error_code", iteration_count);
r += benchmark_type<depth, std::error_code>("std::error_code", iteration_count);
r += benchmark_type<depth, e_system_error>("e_system_error", iteration_count);
r += benchmark_type<depth, e_heavy_payload>("e_heavy_payload", iteration_count);
std::cout << '\n';
// std::cout << std::rand() << '\n';
return r;
}
================================================
FILE: benchmark/deep_stack_other.cpp
================================================
// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See benchmark.md
#ifndef BENCHMARK_WHAT
# define BENCHMARK_WHAT 0
#endif
#if BENCHMARK_WHAT == 0
# ifndef TL_EXPECTED_HPP
# include "tl/expected.hpp"
# endif
# define BENCHMARK_SUCCESS(e) e
# define BENCHMARK_FAILURE(e) tl::make_unexpected(e)
# define BENCHMARK_TRY(v,r)\
auto && _r_##v = r;\
if( !_r_##v )\
return BENCHMARK_FAILURE(_r_##v.error());\
auto && v = _r_##v.value()
#else
# include <boost/outcome/std_outcome.hpp>
# include <boost/outcome/try.hpp>
# define BENCHMARK_SUCCESS(e) boost::outcome_v2::success(e)
# define BENCHMARK_FAILURE(e) boost::outcome_v2::failure(e)
# define BENCHMARK_TRY BOOST_OUTCOME_TRY
# ifndef BOOST_NO_EXCEPTIONS
# error Please disable exception handling.
# endif
#endif
#ifdef _MSC_VER
# define NOINLINE __declspec(noinline)
# define ALWAYS_INLINE __forceinline
#else
# define NOINLINE __attribute__((noinline))
# define ALWAYS_INLINE __attribute__((always_inline)) inline
#endif
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <chrono>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <numeric>
#include <algorithm>
#include <system_error>
#include <array>
namespace boost
{
void throw_exception( std::exception const & e )
{
std::cerr << "Terminating due to a C++ exception under BOOST_NO_EXCEPTIONS: " << e.what();
std::terminate();
}
struct source_location;
void throw_exception( std::exception const & e, boost::source_location const & )
{
throw_exception(e);
}
}
//////////////////////////////////////
#if BENCHMARK_WHAT == 0 // tl::expected
# define USING_RESULT_TYPE "tl::expected<T, E>"
template <class T, class E>
using result = tl::expected<T, E>;
#elif BENCHMARK_WHAT == 1 // outcome::result
# define USING_RESULT_TYPE "outcome::result<T, E>"
template <class T, class E>
using result = boost::outcome_v2::std_result<T, E, boost::outcome_v2::policy::terminate>;
#elif BENCHMARK_WHAT == 2 // outcome::outcome
# define USING_RESULT_TYPE "outcome::outcome<T, E>"
template <class T, class E>
using result = boost::outcome_v2::std_outcome<T, E>;
#else
# error Benchmark what?
#endif
//////////////////////////////////////
enum class e_error_code
{
ec0, ec1, ec2, ec3
};
struct e_system_error
{
int value;
std::string what;
};
struct e_heavy_payload
{
std::array<char, 4096> value;
};
template <class E>
E make_error() noexcept;
template <>
inline e_error_code make_error<e_error_code>() noexcept
{
switch(std::rand()%4)
{
default: return e_error_code::ec0;
case 1: return e_error_code::ec1;
case 2: return e_error_code::ec2;
case 3: return e_error_code::ec3;
}
}
template <>
inline std::error_code make_error<std::error_code>() noexcept
{
return std::error_code(std::rand(), std::system_category());
}
template <>
inline e_system_error make_error<e_system_error>() noexcept
{
return { std::rand(), std::string(std::rand()%32, ' ') };
}
template <>
inline e_heavy_payload make_error<e_heavy_payload>() noexcept
{
e_heavy_payload e;
std::fill(e.value.begin(), e.value.end(), std::rand());
return e;
}
inline bool should_fail( int failure_rate ) noexcept
{
assert(failure_rate>=0);
assert(failure_rate<=100);
return (std::rand()%100) < failure_rate;
}
inline int handle_error( e_error_code e ) noexcept
{
return int(e);
}
inline int handle_error( std::error_code const & e ) noexcept
{
return e.value();
}
inline int handle_error( e_system_error const & e ) noexcept
{
return e.value + e.what.size();
}
inline int handle_error( e_heavy_payload const & e ) noexcept
{
return std::accumulate(e.value.begin(), e.value.end(), 0);
}
//////////////////////////////////////
// This is used to change the "success" type at each level.
// Generally, functions return values of different types.
template <int N, class E, bool Odd = N%2>
struct select_result_type;
template <int N, class E>
struct select_result_type<N, E, true>
{
using type = result<int, E>;
};
template <int N, class E>
struct select_result_type<N, E, false>
{
using type = result<float, E>;
};
template <int N, class E>
using select_result_t = typename select_result_type<N, E>::type;
//////////////////////////////////////
template <int N, class E>
struct benchmark
{
using e_type = E;
NOINLINE static select_result_t<N, E> f( int failure_rate ) noexcept
{
BENCHMARK_TRY(x, (benchmark<N-1, E>::f(failure_rate)));
return BENCHMARK_SUCCESS(x+1);
}
};
template <class E>
struct benchmark<1, E>
{
using e_type = E;
NOINLINE static select_result_t<1, E> f( int failure_rate ) noexcept
{
if( should_fail(failure_rate) )
return BENCHMARK_FAILURE(make_error<E>());
else
return BENCHMARK_SUCCESS(std::rand());
}
};
//////////////////////////////////////
template <class Benchmark>
NOINLINE int runner( int failure_rate ) noexcept
{
if( auto r = Benchmark::f(failure_rate) )
return r.value();
else
return handle_error(r.error());
}
//////////////////////////////////////
std::fstream append_csv()
{
if( FILE * f = fopen("benchmark.csv","rb") )
{
fclose(f);
return std::fstream("benchmark.csv", std::fstream::out | std::fstream::app);
}
else
{
std::fstream fs("benchmark.csv", std::fstream::out | std::fstream::app);
fs << "\"Result Type\",2%,98%\n";
return fs;
}
}
template <class F>
int print_elapsed_time( int iteration_count, F && f )
{
auto start = std::chrono::steady_clock::now();
int val = 0;
for( int i = 0; i!=iteration_count; ++i )
val += std::forward<F>(f)();
auto stop = std::chrono::steady_clock::now();
int elapsed = std::chrono::duration_cast<std::chrono::microseconds>(stop-start).count();
std::cout << std::right << std::setw(9) << elapsed;
append_csv() << ',' << elapsed;
return val;
}
//////////////////////////////////////
template <int Depth, class E>
int benchmark_type( char const * type_name, int iteration_count )
{
int x=0;
append_csv() << "\"" USING_RESULT_TYPE "\"";
std::cout << '\n' << std::left << std::setw(16) << type_name << '|';
std::srand(0);
x += print_elapsed_time( iteration_count, [] { return runner<benchmark<Depth, E>>(2); } );
std::cout << " |";
std::srand(0);
x += print_elapsed_time( iteration_count, [] { return runner<benchmark<Depth, E>>(98); } );
append_csv() << '\n';
return x;
}
//////////////////////////////////////
int main()
{
int const depth = 10;
int const iteration_count = 10000000;
std::cout <<
iteration_count << " iterations, call depth " << depth << ", sizeof(e_heavy_payload) = " << sizeof(e_heavy_payload) << "\n"
USING_RESULT_TYPE "\n"
"Error type | 2% (μs) | 98% (μs)\n"
"----------------|----------|---------";
int r = 0;
r += benchmark_type<depth, e_error_code>("e_error_code", iteration_count);
r += benchmark_type<depth, std::error_code>("std::error_code", iteration_count);
r += benchmark_type<depth, e_system_error>("e_system_error", iteration_count);
r += benchmark_type<depth, e_heavy_payload>("e_heavy_payload", iteration_count);
std::cout << '\n';
// std::cout << std::rand() << '\n';
return r;
}
================================================
FILE: conanfile.py
================================================
from conan import ConanFile
from conan.tools.files import copy
from conan.tools.layout import basic_layout
from conan.tools.build import check_min_cppstd
from conan.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.50.0"
class BoostLEAFConan(ConanFile):
name = "boost-leaf"
version = "1.81.0"
license = "BSL-1.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/boostorg/leaf"
description = ("Lightweight Error Augmentation Framework")
topics = ("multi-platform", "multi-threading", "cpp11", "error-handling",
"header-only", "low-latency", "no-dependencies", "single-header")
settings = "os", "compiler", "arch", "build_type"
exports_sources = "include/*", "LICENSE_1_0.txt"
no_copy_source = True
def package_id(self):
self.info.clear()
@property
def _min_cppstd(self):
return "11"
@property
def _compilers_minimum_version(self):
return {
"gcc": "4.8",
"Visual Studio": "17",
"msvc": "141",
"clang": "3.9",
"apple-clang": "10.0.0"
}
def requirements(self):
pass
def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, self._min_cppstd)
def lazy_lt_semver(v1, v2):
lv1 = [int(v) for v in v1.split(".")]
lv2 = [int(v) for v in v2.split(".")]
min_length = min(len(lv1), len(lv2))
return lv1[:min_length] < lv2[:min_length]
compiler = str(self.settings.compiler)
version = str(self.settings.compiler.version)
minimum_version = self._compilers_minimum_version.get(compiler, False)
if minimum_version and lazy_lt_semver(version, minimum_version):
raise ConanInvalidConfiguration(
f"{self.name} {self.version} requires C++{self._min_cppstd}, which your compiler ({compiler}-{version}) does not support")
def layout(self):
basic_layout(self)
def package(self):
copy(self, "LICENSE_1_0.txt", dst=os.path.join(
self.package_folder, "licenses"), src=self.source_folder)
copy(self, "*.h", dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include"))
copy(self, "*.hpp", dst=os.path.join(self.package_folder,
"include"), src=os.path.join(self.source_folder, "include"))
def package_info(self):
self.cpp_info.set_property("cmake_target_name", "boost::leaf")
self.cpp_info.bindirs = []
self.cpp_info.frameworkdirs = []
self.cpp_info.libdirs = []
self.cpp_info.resdirs = []
================================================
FILE: doc/Jamfile
================================================
# Copyright 2017 Peter Dimov
# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
project doc/leaf ;
import asciidoctor ;
html index.html : leaf.adoc : <asciidoctor-attribute>stylesheet=zajo-dark.css <asciidoctor-attribute>linkcss ;
install html_ : index.html LEAF-1.png LEAF-2.png skin.png zajo-dark.css zajo-light.css rouge-github.css : <location>html ;
pdf leaf.pdf : leaf.adoc : <asciidoctor-doctype>book <asciidoctor-attribute>pdf-themesdir=. <asciidoctor-attribute>pdf-theme=leaf ;
install pdf_ : leaf.pdf : <location>html ;
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : html_ ;
explicit boostrelease ;
================================================
FILE: doc/docinfo.html
================================================
<meta name="keywords" content="c++,error handling,open source">
<meta name="description" content="Lightweight Error Augmentation Framework">
<link rel="stylesheet" href="./zajo-light.css" disabled=true>
<script>
function switch_style()
{
var i, tag;
for( i=0, tag=document.getElementsByTagName("link"); i<tag.length; i++ )
if( tag[i].rel.indexOf("stylesheet")!=-1 && tag[i].href.includes("zajo-") )
tag[i].disabled = !tag[i].disabled;
}
</script>
================================================
FILE: doc/leaf-theme.yml
================================================
extends: default
base:
font:
color: #404040
literal:
font:
family: Courier
color: #000000
admonition:
icon:
note:
stroke-color: #000000
tip:
stroke-color: #000000
warning:
stroke-color: #FF5100
important:
stroke-color: #FF5100
caution:
stroke-color: #FF5100
conum:
font:
glyphs: circled
color: #000000
link:
text-decoration: underline
text-decoration-width: 0.5
font-color: #000000
================================================
FILE: doc/leaf.adoc
================================================
:last-update-label!:
:icons: font
:prewrap!:
:docinfo: shared
:stylesheet: zajo-dark.css
:source-highlighter: rouge
ifdef::backend-pdf[]
= LEAF
endif::[]
ifndef::backend-pdf[]
= LEAFpass:[<div style="z-index: 3; bottom:-16px; right:4px; position:fixed"><input width="32" height="32" type="image" alt="Skin" src="./skin.png" onclick="this.blur();switch_style();return false;"/></div>]
endif::[]
Lightweight Error Augmentation Framework written in {CPP}11 | Emil Dotchevski
ifndef::backend-pdf[]
:toc: left
:toclevels: 3
:toc-title:
[.text-right]
https://github.com/boostorg/leaf[GitHub] | https://boostorg.github.io/leaf/leaf.pdf[PDF]
endif::[]
[abstract]
== Abstract
Boost LEAF is a lightweight error handling library for {CPP}11. Features:
====
* Portable single-header format, no dependencies.
* Tiny code size when configured 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.
====
ifndef::backend-pdf[]
[grid=none, frame=none]
|====
| <<tutorial>> \| <<synopsis>> \| https://github.com/boostorg/leaf/blob/master/doc/whitepaper.md[Whitepaper] \| https://github.com/boostorg/leaf/blob/master/benchmark/benchmark.md[Benchmark] >| Reference: <<functions,Functions>> \| <<types,Types>> \| <<predicates,Predicates>> \| <<traits,Traits>> \| <<macros,Macros>>
|====
endif::[]
[[support]]
== Support
* https://Cpplang.slack.com[cpplang on Slack] (use the `#boost` channel)
* https://lists.boost.org/mailman/listinfo.cgi/boost-users[Boost Users Mailing List]
* https://lists.boost.org/mailman/listinfo.cgi/boost[Boost Developers Mailing List]
* https://github.com/boostorg/leaf/issues[Report issues] on GitHub
[[distribution]]
== Distribution
LEAF is distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].
There are three distribution channels:
* LEAF is included in official https://www.boost.org/[Boost] releases (starting with Boost 1.75), and therefore available via most package managers.
* The source code is hosted on https://github.com/boostorg/leaf[GitHub].
* For maximum portability, the latest LEAF release is also available in single-header format: simply download link:https://raw.githubusercontent.com/boostorg/leaf/gh-pages/leaf.hpp[leaf.hpp] (direct download link).
NOTE: LEAF does not depend on Boost or other libraries.
[[tutorial]]
== Tutorial
What is a failure? It is simply the inability of a function to return a valid result, instead producing an error object describing the reason for the failure.
A typical design is to return a variant type, e.g. `result<T, E>`. Internally, such variant types must store a discriminant (in this case a boolean) to indicate whether the object holds a `T` or an `E`.
The design of LEAF is informed by the observation that the immediate caller must have access to the discriminant in order to determine the availability of a valid `T`, but otherwise it rarely needs to access the `E`. The error object is only needed once an error handling scope is reached.
Therefore what would have been a `result<T, E>` becomes `result<T>`, which stores the discriminant and (optionally) a `T`, while the `E` is communicated directly to the error handling scope where it is needed.
The benefit of this decomposition is that `result<T>` becomes extremely lightweight, as it is not coupled with error types; further, error objects are communicated in constant time (independent of the call stack depth). Even very large objects are handled efficiently without dynamic memory allocation.
=== Reporting Errors
A function that reports an error is pretty straight-forward:
[source,c++]
----
enum class err1 { e1, e2, e3 };
leaf::result<T> f()
{
....
if( error_detected )
return leaf::new_error( err1::e1 ); // Pass an error object of any type
// Produce and return a T.
}
----
[.text-right]
<<result>> | <<new_error>>
'''
[[checking_for_errors]]
=== Checking for Errors
Checking for errors communicated by a `leaf::result<T>` works as expected:
[source,c++]
----
leaf::result<U> g()
{
leaf::result<T> r = f();
if( !r )
return r.error();
T const & v = r.value();
// Use v to produce a valid U
}
----
[.text-right]
<<result>>
TIP: The the result of `r.error()` is compatible with any instance of the `leaf::result` template. In the example above, note that `g` returns a `leaf::result<U>`, while `r` is of type `leaf::result<T>`.
The boilerplate `if` statement can be avoided using `BOOST_LEAF_AUTO`:
[source,c++]
----
leaf::result<U> g()
{
BOOST_LEAF_AUTO(v, f()); // Bail out on error
// Use v to produce a valid U
}
----
[.text-right]
<<BOOST_LEAF_AUTO>>
`BOOST_LEAF_AUTO` can not be used with `void` results; in that case, to avoid the boilerplate `if` statement, use `BOOST_LEAF_CHECK`:
[source,c++]
----
leaf::result<void> f();
leaf::result<int> g()
{
BOOST_LEAF_CHECK(f()); // Bail out on error
return 42;
}
----
[.text-right]
<<BOOST_LEAF_CHECK>>
On implementations that define `pass:[__GNUC__]` (e.g. GCC/clang), the `BOOST_LEAF_CHECK` macro definition takes advantage of https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html[GNU C statement expressions]. In this case, in addition to its portable usage with `result<void>`, `BOOST_LEAF_CHECK` can be used in expressions with non-`void` result types:
[source,c++]
----
leaf::result<int> f();
float g(int x);
leaf::result<float> t()
{
return g( BOOST_LEAF_CHECK(f()) );
}
----
The following is the portable alternative:
[source,c++]
----
leaf::result<float> t()
{
BOOST_LEAF_AUTO(x, f());
return g(x);
}
----
'''
[[tutorial-error_handling]]
=== Error Handling
Error handling scopes must use a special syntax to indicate that they need to access error objects. The following excerpt attempts several operations and handles errors of type `err1`:
[source,c++]
----
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(v1, f1());
BOOST_LEAF_AUTO(v2, f2());
return g(v1, v2);
},
[]( err1 e ) -> leaf::result<U>
{
if( e == err1::e1 )
.... // Handle err1::e1
else
.... // Handle any other err1 value
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
The first lambda passed to `try_handle_some` is executed first; it attempts to produce a `result<U>`, but it may fail.
The second lambda is an error handler: it will be called iff the first lambda fails and an error object of type `err1` was communicated to LEAF. That object is stored on the stack, local to the `try_handle_some` function (LEAF knows to allocate this storage because we gave it an error handler that takes an `err1`). Error handlers passed to `leaf::try_handle_some` can return a valid `leaf::result<U>` but are allowed to fail.
It is possible for an error handler to specify that it can only deal with some values of a given error type:
[source,c++]
----
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(v1, f1());
BOOST_LEAF_AUTO(v2, f2());
return g(v1. v2);
},
[]( leaf::match<err1, err1::e1, err1::e3> ) -> leaf::result<U>
{
// Handle err::e1 or err1::e3
},
[]( err1 e ) -> leaf::result<U>
{
// Handle any other err1 value
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>> | <<match>>
LEAF considers the provided error handlers in order, and calls the first one for which it can supply arguments, based on the error objects currently being communicated. Above:
* The first error handler uses the predicate `leaf::match` to specify that it should only be considered if an error object of type `err1` is available, and its value is either `err1::e1` or `err1::e3`.
* Otherwise the second error handler will be called if an error object of type `err1` is available, regardless of its value.
* Otherwise `leaf::try_handle_some` fails.
It is possible for an error handler to conditionally leave the current failure unhandled:
[source,c++]
----
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(v1, f1());
BOOST_LEAF_AUTO(v2, f2());
return g(v1. v2);
},
[]( err1 e, leaf::error_info const & ei ) -> leaf::result<U>
{
if( <<condition>> )
return valid_U;
else
return ei.error();
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>> | <<error_info>>
Any error handler can take an argument of type `leaf::error_info const &` to get access to generic information about the error being handled; in this case we use the `error` member function, which returns the unique <<error_id>> of the current error; we use it to initialize the returned `leaf::result`, effectively propagating the current error out of `try_handle_some`.
TIP: If we wanted to signal a new error (rather than propagating the current error), in the `return` statement we would invoke the `leaf::new_error` function.
If we want to ensure that all possible failures are handled, we use `leaf::try_handle_all` instead of `leaf::try_handle_some`:
[source,c++]
----
U r = leaf::try_handle_all(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(v1, f1());
BOOST_LEAF_AUTO(v2, f2());
return g(v1. v2);
},
[]( leaf::match<err1, err1::e1> ) -> U
{
// Handle err::e1
},
[]( err1 e ) -> U
{
// Handle any other err1 value
},
[]() -> U
{
// Handle any other failure
} );
----
[.text-right]
<<try_handle_all>>
The `leaf::try_handle_all` function enforces at compile time that at least one of the supplied error handlers takes no arguments (and therefore is able to handle any failure). In addition, all error handlers are forced to return a valid `U`, rather than a `leaf::result<U>`, so that `leaf::try_handle_all` is guaranteed to succeed, always.
'''
=== Working with Different Error Types
It is of course possible to provide different handlers for different error types:
[source,c++]
----
enum class err1 { e1, e2, e3 };
enum class err2 { e1, e2 };
....
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(v1, f1());
BOOST_LEAF_AUTO(v2, f2());
return g(v1, v2);
},
[]( err1 e ) -> leaf::result<U>
{
// Handle errors of type `err1`.
},
[]( err2 e ) -> leaf::result<U>
{
// Handle errors of type `err2`.
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
Recall that error handlers are always considered in order:
* The first error handler will be used if an error object of type `err1` is available;
* otherwise, the second error handler will be used if an error object of type `err2` is available;
* otherwise, `leaf::try_handle_some` fails.
'''
=== Working with Multiple Error Objects
The `leaf::new_error` function can be invoked with multiple error objects, for example to communicate an error code and the relevant file name:
[source,c++]
----
enum class io_error { open_error, read_error, write_error };
struct e_file_name { std::string value; }
leaf::result<File> open_file( char const * name )
{
....
if( open_failed )
return leaf::new_error(io_error::open_error, e_file_name {name});
....
}
----
[.text-right]
<<result>> | <<new_error>>
Similarly, error handlers may take multiple error objects as arguments:
[source,c++]
----
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(f, open_file(fn));
....
},
[]( io_error ec, e_file_name fn ) -> leaf::result<U>
{
// Handle I/O errors when a file name is available.
},
[]( io_error ec ) -> leaf::result<U>
{
// Handle I/O errors when no file name is available.
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
Once again, error handlers are considered in order:
* The first error handler will be used if an error object of type `io_error` _and_ and error_object of type `e_file_name` are available;
* otherwise, the second error handler will be used if an error object of type `io_error` is avaliable;
* otherwise, `leaf_try_handle_some` fails.
An alternative way to write the above is to provide a single error handler that takes the `e_file_name` argument as a pointer:
[source,c++]
----
leaf::result<U> r = leaf::try_handle_some(
[]() -> leaf::result<U>
{
BOOST_LEAF_AUTO(f, open_file(fn));
....
},
[]( io_error ec, e_file_name const * fn ) -> leaf::result<U>
{
if( fn )
.... // Handle I/O errors when a file name is available.
else
.... // Handle I/O errors when no file name is available.
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
An error handler is never dropped for lack of error objects of types which the handler takes as pointers; in this case LEAF simply passes `0` for these arguments.
TIP: Error handlers can take arguments by value, by (`const`) reference or as a (`const`) pointer. It the latter case, changes to the error object state will be propagated up the call stack if the failure is not handled.
[[tutorial-augmenting_errors]]
=== Augmenting Errors
Let's say we have a function `parse_line` which could fail due to an `io_error` or a `parse_error`:
[source,c++]
----
enum class io_error { open_error, read_error, write_error };
enum class parse_error { bad_syntax, bad_range };
leaf::result<int> parse_line( FILE * f );
----
The `leaf::on_error` function can be used to automatically associate additional error objects with any failure that is "in flight":
[source,c++]
----
struct e_line { int value; };
leaf::result<void> process_file( FILE * f )
{
for( int current_line = 1; current_line != 10; ++current_line )
{
auto load = leaf::on_error( e_line {current_line} );
BOOST_LEAF_AUTO(v, parse_line(f));
// use v
}
}
----
[.text-right]
<<on_error>> | <<BOOST_LEAF_AUTO>>
Because `process_file` does not handle errors, it remains neutral to failures, except to attach the `current_line` if something goes wrong. The object returned by `on_error` holds a copy of the `current_line` wrapped in `struct e_line`. If `parse_line` succeeds, the `e_line` object is simply discarded; but if it fails, the `e_line` object will be automatically "attached" to the failure.
Such failures can then be handled like so:
[source,c++]
----
leaf::result<void> r = leaf::try_handle_some(
[&]() -> leaf::result<void>
{
BOOST_LEAF_CHECK( process_file(f) );
},
[]( parse_error e, e_line current_line )
{
std::cerr << "Parse error at line " << current_line.value << std::endl;
},
[]( io_error e, e_line current_line )
{
std::cerr << "I/O error at line " << current_line.value << std::endl;
},
[]( io_error e )
{
std::cerr << "I/O error" << std::endl;
} );
----
[.text-right]
<<try_handle_some>> | <<BOOST_LEAF_CHECK>>
The following is equivalent, and perhaps simpler:
[source,c++]
----
leaf::result<void> r = leaf::try_handle_some(
[]() -> leaf::result<void>
{
BOOST_LEAF_CHECK( process_file(f) );
},
[]( parse_error e, e_line current_line )
{
std::cerr << "Parse error at line " << current_line.value << std::endl;
},
[]( io_error e, e_line const * current_line )
{
std::cerr << "Parse error";
if( current_line )
std::cerr << " at line " << current_line->value;
std::cerr << std::endl;
} );
----
'''
[[tutorial-exception_handling]]
=== Exception Handling
What happens if an operation throws an exception? Not to worry, both `try_handle_some` and `try_handle_all` catch exceptions and are able to pass them to any compatible error handler:
[source,c++]
----
leaf::result<void> r = leaf::try_handle_some(
[]() -> leaf::result<void>
{
BOOST_LEAF_CHECK( process_file(f) );
},
[]( std::bad_alloc const & )
{
std::cerr << "Out of memory!" << std::endl;
},
[]( parse_error e, e_line l )
{
std::cerr << "Parse error at line " << l.value << std::endl;
},
[]( io_error e, e_line const * l )
{
std::cerr << "Parse error";
if( l )
std::cerr << " at line " << l.value;
std::cerr << std::endl;
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_CHECK>>
Above, we have simply added an error handler that takes a `std::bad_alloc`, and everything "just works" as expected: LEAF will dispatch error handlers correctly no matter if failures are communicated via `leaf::result` or by an exception.
Of course, if we use exception handling exclusively, we do not need `leaf::result` at all. In this case we use `leaf::try_catch`:
[source,c++]
----
leaf::try_catch(
[]
{
process_file(f);
},
[]( std::bad_alloc const & )
{
std::cerr << "Out of memory!" << std::endl;
},
[]( parse_error e, e_line l )
{
std::cerr << "Parse error at line " << l.value << std::endl;
},
[]( io_error e, e_line const * l )
{
std::cerr << "Parse error";
if( l )
std::cerr << " at line " << l.value;
std::cerr << std::endl;
} );
----
[.text-right]
<<try_catch>>
Remarkably, we did not have to change the error handlers! But how does this work? What kind of exceptions does `process_file` throw?
LEAF enables a novel technique of exception handling, which does not use an exception type hierarchy to classify failures and does not carry data in exception objects. Recall that when failures are communicated via `leaf::result`, we call `leaf::new_error` in a `return` statement, passing any number of error objects which are sent directly to the correct error handling scope:
[source,c++]
----
enum class err1 { e1, e2, e3 };
enum class err2 { e1, e2 };
....
leaf::result<T> f()
{
....
if( error_detected )
return leaf::new_error(err1::e1, err2::e2);
// Produce and return a T.
}
----
[.text-right]
<<result>> | <<new_error>>
When using exception handling this becomes:
[source,c++]
----
enum class err1 { e1, e2, e3 };
enum class err2 { e1, e2 };
T f()
{
if( error_detected )
leaf::throw_exception(err1::e1, err2::e2);
// Produce and return a T.
}
----
[.text-right]
<<throw_exception>>
The `leaf::throw_exception` function handles the passed error objects just like `leaf::new_error` does, and then throws an object of a type that derives from `std::exception`. Using this technique, the exception type is not important: `leaf::try_catch` catches all exceptions, then goes through the usual LEAF error handler selection procedure.
If instead we want to use the legacy convention of throwing different types to indicate different failures, we simply pass an exception object (that is, an object of a type that derives from `std::exception`) as the first argument to `leaf::throw_exception`:
[source,c++]
----
leaf::throw_exception(std::runtime_error("Error!"), err1::e1, err2::e2);
----
In this case the returned object will be of type that derives from `std::runtime_error`, rather than from `std::exception`.
Finally, `leaf::on_error` "just works" as well. Here is our `process_file` function rewritten to work with exceptions, rather than return a `leaf::result` (see <<tutorial-augmenting_errors>>):
[source,c++]
----
int parse_line( FILE * f ); // Throws
struct e_line { int value; };
void process_file( FILE * f )
{
for( int current_line = 1; current_line != 10; ++current_line )
{
auto load = leaf::on_error( e_line {current_line} );
int v = parse_line(f);
// use v
}
}
----
[.text-right]
<<on_error>>
'''
=== Using External `result` Types
Static type checking creates difficulties in error handling interoperability in any non-trivial project. Using exception handling alleviates this problem somewhat because in that case error types are not burned into function signatures, so errors easily punch through multiple layers of APIs; but this doesn't help {CPP} in general because the community is fractured on the issue of exception handling. That debate notwithstanding, the reality is that {CPP} programs need to handle errors communicated through multiple layers of APIs via a plethora of error codes, `result` types and exceptions.
LEAF enables application developers to shake error objects out of each individual library's `result` type and send them to error handling scopes verbatim. Here is an example:
[source,c++]
----
lib1::result<int, lib1::error_code> foo();
lib2::result<int, lib2::error_code> bar();
int g( int a, int b );
leaf::result<int> f()
{
auto a = foo();
if( !a )
return leaf::new_error( a.error() );
auto b = bar();
if( !b )
return leaf::new_error( b.error() );
return g( a.value(), b.value() );
}
----
[.text-right]
<<result>> | <<new_error>>
Later we simply call `leaf::try_handle_some` passing an error handler for each type:
[source,c++]
----
leaf::result<int> r = leaf::try_handle_some(
[]() -> leaf::result<int>
{
return f();
},
[]( lib1::error_code ec ) -> leaf::result<int>
{
// Handle lib1::error_code
},
[]( lib2::error_code ec ) -> leaf::result<int>
{
// Handle lib2::error_code
} );
}
----
[.text-right]
<<try_handle_some>> | <<result>>
A possible complication is that we might not have the option to return `leaf::result<int>` from `f`: a third party API may impose a specific signature on it, forcing it to return a library-specific `result` type. This would be the case when `f` is intended to be used as a callback:
[source,c++]
----
void register_callback( std::function<lib3::result<int>()> const & callback );
----
Can we use LEAF in this case? Actually we can, as long as `lib3::result` is able to communicate a `std::error_code`. We just have to let LEAF know, by specializing the `is_result_type` template:
[source,c++]
----
namespace boost { namespace leaf {
template <class T>
struct is_result_type<lib3::result<T>>: std::true_type;
} }
----
[.text-right]
<<is_result_type>>
With this in place, `f` works as before, even though `lib3::result` isn't capable of transporting `lib1` errors or `lib2` errors:
[source,c++]
----
lib1::result<int, lib1::error_type> foo();
lib2::result<int, lib2::error_type> bar();
int g( int a, int b );
lib3::result<int> f()
{
auto a = foo();
if( !a )
return leaf::new_error( a.error() );
auto b = bar();
if( !b )
return leaf::new_error( b.error() );
return g( a.value(), b.value() );
}
----
[.text-right]
<<new_error>>
The object returned by `leaf::new_error` converts implicitly to `std::error_code`, using a LEAF-specific `error_category`, which makes `lib3::result` compatible with `leaf::try_handle_some` (and with `leaf::try_handle_all`):
[source,c++]
----
lib3::result<int> r = leaf::try_handle_some(
[]() -> lib3::result<int>
{
return f();
},
[]( lib1::error_code ec ) -> lib3::result<int>
{
// Handle lib1::error_code
},
[]( lib2::error_code ec ) -> lib3::result<int>
{
// Handle lib2::error_code
} );
}
----
[.text-right]
<<try_handle_some>>
'''
[[tutorial-model]]
=== Error Communication Model
==== `noexcept` API
The following figure illustrates how error objects are transported when using LEAF without exception handling:
.LEAF noexcept Error Communication Model
image::LEAF-1.png[]
The arrows pointing down indicate the call stack order for the functions `f1` through `f5`: higher level functions calling lower level functions.
Note the call to `on_error` in `f3`: it caches the passed error objects of types `E1` and `E3` in the returned object `load`, where they stay ready to be communicated in case any function downstream from `f3` reports an error. Presumably these objects are relevant to any such failure, but are conveniently accessible only in this scope.
_Figure 1_ depicts the condition where `f5` has detected an error. It calls `leaf::new_error` to create a new, unique `error_id`. The passed error object of type `E2` is immediately loaded in the first active `context` object that provides static storage for it, found in any calling scope (in this case `f1`), and is associated with the newly-generated `error_id` (solid arrow);
The `error_id` itself is returned to the immediate caller `f4`, usually stored in a `result<T>` object `r`. That object takes the path shown by dashed arrows, as each error neutral function, unable to handle the failure, forwards it to its immediate caller in the returned value -- until an error handling scope is reached.
When the destructor of the `load` object in `f3` executes, it detects that `new_error` was invoked after its initialization, loads the cached objects of types `E1` and `E3` in the first active `context` object that provides static storage for them, found in any calling scope (in this case `f1`), and associates them with the last generated `error_id` (solid arrow).
When the error handling scope `f1` is reached, it probes `ctx` for any error objects associated with the `error_id` it received from `f2`, and processes a list of user-provided error handlers, in order, until it finds a handler with arguments that can be supplied using the available (in `ctx`) error objects. That handler is called to deal with the failure.
==== Exception Handling API
The following figure illustrates the slightly different error communication model used when errors are reported by throwing exceptions:
.LEAF Error Communication Model Using Exception Handling
image::LEAF-2.png[]
The main difference is that the call to `new_error` is implicit in the call to the function template `leaf::throw_exception`, which in this case takes an exception object of type `Ex`, and throws an exception object of unspecified type that derives publicly from `Ex`.
[[tutorial-interoperability]]
==== Interoperability
Ideally, when an error is detected, a program using LEAF would always call <<new_error>>, ensuring that each encountered failure is definitely assigned a unique <<error_id>>, which then is reliably delivered, by an exception or by a `result<T>` object, to the appropriate error handling scope.
Alas, this is not always possible.
For example, the error may need to be communicated through uncooperative 3rd-party interfaces. To facilitate this transmission, a error ID may be encoded in a `std::error_code`. As long as a 3rd-party interface is able to transport a `std::error_code`, it should be compatible with LEAF.
Further, it is sometimes necessary to communicate errors through an interface that does not even use `std::error_code`. An example of this is when an external lower-level library throws an exception, which is unlikely to be able to carry an `error_id`.
To support this tricky use case, LEAF provides the function <<current_error>>, which returns the error ID returned by the most recent call (from this thread) to <<new_error>>. One possible approach to solving the problem is to use the following logic (implemented by the <<error_monitor>> type):
. Before calling the uncooperative API, call <<current_error>> and cache the returned value.
. Call the API, then call `current_error` again:
.. If this returns the same value as before, pass the error objects to `new_error` to associate them with a new `error_id`;
.. else, associate the error objects with the `error_id` value returned by the second call to `current_error`.
Note that if the above logic is nested (e.g. one function calling another), `new_error` will be called only by the inner-most function, because that call guarantees that all calling functions will hit the `else` branch.
For a detailed tutorial see <<tutorial-on_error_in_c_callbacks>>.
TIP: To avoid ambiguities, whenever possible, use the <<throw_exception>> function template to throw exceptions, to ensure that the exception object transports a unique `error_id`; better yet, use the <<BOOST_LEAF_THROW_EXCEPTION>> macro, which in addition will capture `pass:[__FILE__]` and `pass:[__LINE__]`.
'''
[[tutorial-loading]]
=== Loading of Error Objects
To load an error object is to move it into an active <<context>>, usually local to a <<try_handle_some>>, a <<try_handle_all>> or a <<try_catch>> scope in the calling thread, where it becomes uniquely associated with a specific <<error_id>> -- or discarded if storage is not available.
Various LEAF functions take a list of error objects to load. As an example, if a function `copy_file` that takes the name of the input file and the name of the output file as its arguments detects a failure, it could communicate an error code `ec`, plus the two relevant file names using <<new_error>>:
[source,c++]
----
return leaf::new_error(ec, e_input_name{n1}, e_output_name{n2});
----
Alternatively, error objects may be loaded using a `result<T>` that is already communicating an error. This way they become associated with that error, rather than with a new error:
[source,c++]
----
leaf::result<int> f() noexcept;
leaf::result<void> g( char const * fn ) noexcept
{
if( leaf::result<int> r = f() )
{ <1>
....;
return { };
}
else
{
return r.load( e_file_name{fn} ); <2>
}
}
----
[.text-right]
<<result>> | <<result::load>>
<1> Success! Use `r.value()`.
<2> `f()` has failed; here we associate an additional `e_file_name` with the error. However, this association occurs iff in the call stack leading to `g` there are error handlers that take an `e_file_name` argument. Otherwise, the object passed to `load` is discarded. In other words, the passed objects are loaded iff the program actually uses them to handle errors.
Besides error objects, `load` can take function arguments:
* If we pass a function that takes no arguments, it is invoked, and the returned error object is loaded.
+
Consider that if we pass to `load` an error object that is not needed by any error handler, it will be discarded. If the object is expensive to compute, it would be better if the computation can be skipped as well. Passing a function with no arguments to `load` is an excellent way to achieve this behavior:
+
[source,c++]
----
struct info { .... };
info compute_info() noexcept;
leaf::result<void> operation( char const * file_name ) noexcept
{
if( leaf::result<int> r = try_something() )
{ <1>
....
return { };
}
else
{
return r.load( <2>
[&]
{
return compute_info();
} );
}
}
----
[.text-right]
<<result>> | <<result::load>>
+
<1> Success! Use `r.value()`.
<2> `try_something` has failed; `compute_info` will only be called if an error handler exists which takes a `info` argument.
+
* If we pass a function that takes a single argument of type `E &`, LEAF calls the function with the object of type `E` currently loaded in an active `context`, associated with the error. If no such object is available, a new one is default-initialized and then passed to the function.
+
For example, if an operation that involves many different files fails, a program may provide for collecting all relevant file names in a `e_relevant_file_names` object:
+
[source,c++]
----
struct e_relevant_file_names
{
std::vector<std::string> value;
};
leaf::result<void> operation( char const * file_name ) noexcept
{
if( leaf::result<int> r = try_something() )
{ <1>
....
return { };
}
else
{
return r.load( <2>
[&](e_relevant_file_names & e)
{
e.value.push_back(file_name);
} );
}
}
----
[.text-right]
<<result>> | <<result::load>>
+
<1> Success! Use `r.value()`.
<2> `try_something` has failed -- add `file_name` to the `e_relevant_file_names` object, associated with the `error_id` communicated in `r`. Note, however, that the passed function will only be called iff in the call stack there are error handlers that take an `e_relevant_file_names` object.
'''
[[tutorial-on_error]]
=== Using `on_error`
It is not typical for an error reporting function to be able to supply all of the data needed by a suitable error handling function in order to recover from the failure. For example, a function that reports `FILE` failures may not have access to the file name, yet an error handling function needs it in order to print a useful error message.
Of course the file name is typically readily available in the call stack leading to the failed `FILE` operation. Below, while `parse_info` can't report the file name, `parse_file` can and does:
[source,c++]
----
leaf::result<info> parse_info( FILE * f ) noexcept; <1>
leaf::result<info> parse_file( char const * file_name ) noexcept
{
auto load = leaf::on_error(leaf::e_file_name{file_name}); <2>
if( FILE * f = fopen(file_name,"r") )
{
auto r = parse_info(f);
fclose(f);
return r;
}
else
return leaf::new_error( error_enum::file_open_error );
}
----
[.text-right]
<<result>> | <<on_error>> | <<new_error>>
<1> `parse_info` parses `f`, communicating errors using `result<info>`.
<2> Using `on_error` ensures that the file name is included with any error reported out of `parse_file`. All we need to do is hold on to the returned object `load`; when it expires, if an error is being reported, the passed `e_file_name` value will be automatically associated with it.
TIP: `on_error` -- like `load` -- can be passed any number of arguments.
When we invoke `on_error`, we can pass three kinds of arguments:
. Actual error objects (like in the example above);
. Functions that take no arguments and return an error object;
. Functions that take an error object by mutable reference.
If we want to use `on_error` to capture `errno`, we can't just pass <<e_errno>> to it, because at that time it hasn't been set (yet). Instead, we'd pass a function that returns it:
[source,c++]
----
void read_file(FILE * f) {
auto load = leaf::on_error([]{ return e_errno{errno}; });
....
size_t nr1=fread(buf1,1,count1,f);
if( ferror(f) )
leaf::throw_exception();
size_t nr2=fread(buf2,1,count2,f);
if( ferror(f) )
leaf::throw_exception();
size_t nr3=fread(buf3,1,count3,f);
if( ferror(f) )
leaf::throw_exception();
....
}
----
Above, if `throw_exception` is called, LEAF will invoke the function passed to `on_error` and associate the returned `e_errno` object with the exception.
The final argument type that can be passed to `on_error` is a function that takes a single mutable error object reference. In this case, `on_error` uses it similarly to how such functions are used by `load`; see <<tutorial-loading>>.
'''
[[tutorial-predicates]]
=== Using Predicates to Handle Errors
Usually, LEAF error handlers are selected based on the type of the arguments they take and the type of the available error objects. When an error handler takes a predicate type as an argument, the <<handler_selection_procedure,handler selection procedure>> is able to also take into account the _value_ of the available error objects.
Consider this error code enum:
[source,c++]
----
enum class my_error
{
e1=1,
e2,
e3
};
----
We could handle `my_error` errors like so:
[source,c++]
----
return leaf::try_handle_some(
[]
{
return f(); // returns leaf::result<T>
},
[]( my_error e )
{ <1>
switch(e)
{
case my_error::e1:
....; <2>
break;
case my_error::e2:
case my_error::e3:
....; <3>
break;
default:
....; <4>
break;
} );
----
<1> This handler will be selected if we've got a `my_error` object.
<2> Handle `e1` errors.
<3> Handle `e2` and `e3` errors.
<4> Handle bad `my_error` values.
If `my_error` object is available, LEAF will call our error handler. If not, the failure will be forwarded to our caller.
This can be rewritten using the <<match>> predicate to organize the different cases in different error handlers. The following is equivalent:
[source,c++]
----
return leaf::try_handle_some(
[]
{
return f(); // returns leaf::result<T>
},
[]( leaf::match<my_error, my_error::e1> m )
{ <1>
assert(m.matched == my_error::e1);
....;
},
[]( leaf::match<my_error, my_error::e2, my_error::e3> m )
{ <2>
assert(m.matched == my_error::e2 || m.matched == my_error::e3);
....;
},
[]( my_error e )
{ <3>
....;
} );
----
<1> We've got a `my_error` object that compares equal to `e1`.
<2> We`ve got a `my_error` object that compares equal to either `e2` or `e3`.
<3> Handle bad `my_error` values.
The first argument to the `match` template generally specifies the type `E` of the error object `e` that must be available for the error handler to be considered at all. Typically, the rest of the arguments are values. The error handler is dropped if `e` does not compare equal to any of them.
In particular, `match` works great with `std::error_code`. The following handler is designed to handle `ENOENT` errors:
[source,c++]
----
[]( leaf::match<std::error_code, std::errc::no_such_file_or_directory> )
{
}
----
This, however, requires {CPP}17 or newer, because it is impossible to infer the type of the error enum (in this case, `std::errc`) from the specified type `std::error_code`, and {CPP}11 does not allow `auto` template arguments. LEAF provides the following workaround, compatible with {CPP}11:
[source,c++]
----
[]( leaf::match<leaf::condition<std::errc>, std::errc::no_such_file_or_directory> )
{
}
----
In addition, it is possible to select a handler based on `std::error_category`. The following handler will match any `std::error_code` of the `std::generic_category` (requires {CPP}17 or newer):
[source,c++]
----
[]( std::error_code, leaf::category<std::errc>> )
{
}
----
TIP: See <<match>> for more examples.
The following predicates are available:
* <<match>>: as described above.
* <<match_value>>: where `match<E, V...>` compares the object `e` of type `E` with the values `V...`, `match_value<E, V...>` compare `e.value` with the values `V...`.
* <<match_member>>: similar to `match_value`, but takes a pointer to the data member to compare; that is, `match_member<&E::value, V...>` is equvialent to `match_value<E, V...>`. Note, however, that `match_member` requires {CPP}17 or newer, while `match_value` does not.
* `<<catch_,catch_>><Ex...>`: Similar to `match`, but checks whether the caught `std::exception` object can be `dynamic_cast` to any of the `Ex` types.
* <<if_not>> is a special predicate that takes any other predicate `Pred` and requires that an error object of type `E` is available and that `Pred` evaluates to `false`. For example, `if_not<match<E, V...>>` requires that an object `e` of type `E` is available, and that it does not compare equal to any of the specified `V...`.
Finally, the predicate system is easily extensible, see <<predicates,Predicates>>.
NOTE: See also <<tutorial-std_error_code>>.
'''
[[tutorial-binding_handlers]]
=== Binding Error Handlers in a `std::tuple`
Consider this snippet:
[source,c++]
----
leaf::try_handle_all(
[&]
{
return f(); // returns leaf::result<T>
},
[](my_error_enum x)
{
...
},
[](read_file_error_enum y, e_file_name const & fn)
{
...
},
[]
{
...
});
----
[.text-right]
<<try_handle_all>> | <<e_file_name>>
Looks pretty simple, but what if we need to attempt a different set of operations yet use the same handlers? We could repeat the same thing with a different function passed as `TryBlock` for `try_handle_all`:
[source,c++]
----
leaf::try_handle_all(
[&]
{
return g(); // returns leaf::result<T>
},
[](my_error_enum x)
{
...
},
[](read_file_error_enum y, e_file_name const & fn)
{
...
},
[]
{
...
});
----
That works, but it is better to bind our error handlers in a `std::tuple`:
[source,c++]
----
auto error_handlers = std::make_tuple(
[](my_error_enum x)
{
...
},
[](read_file_error_enum y, e_file_name const & fn)
{
...
},
[]
{
...
});
----
The `error_handlers` tuple can later be used with any error handling function:
[source,c++]
----
leaf::try_handle_all(
[&]
{
// Operations which may fail <1>
},
error_handlers );
leaf::try_handle_all(
[&]
{
// Different operations which may fail <2>
},
error_handlers ); <3>
----
[.text-right]
<<try_handle_all>> | <<error_info>>
<1> One set of operations which may fail...
<2> A different set of operations which may fail...
<3> ... both using the same `error_handlers`.
Error handling functions accept a `std::tuple` of error handlers in place of any error handler. The behavior is as if the tuple is unwrapped in-place.
'''
[[tutorial-async]]
=== Transporting Error Objects Between Threads
Error objects are stored on the stack in an instance of the <<context>> class template in the scope of e.g. <<try_handle_some>>, <<try_handle_all>> or <<try_catch>> functions. When using concurrency, we need a mechanism to collect error objects in one thread, then use them to handle errors in another thread.
LEAF offers two interfaces for this purpose, one using `result<T>`, and another designed for programs that use exception handling.
[[tutorial-async_result]]
==== Using `result<T>`
Let's assume we have a `task` that we want to launch asynchronously, which produces a `task_result` but could also fail:
[source,c++]
----
leaf::result<task_result> task();
----
Because the task will run asynchronously, in case of a failure we need it to capture the relevant error objects but not handle errors. To this end, in the main thread we bind our error handlers in a `std::tuple`, which we will later use to handle errors from each completed asynchronous task (see <<tutorial-binding_handlers,tutorial>>):
[source,c++]
----
auto error_handlers = std::make_tuple(
[](E1 e1, E2 e2)
{
//Deal with E1, E2
....
return { };
},
[](E3 e3)
{
//Deal with E3
....
return { };
} );
----
Why did we start with this step? Because we need to create a <<context>> object to collect the error objects we need. We could just instantiate the `context` template with `E1`, `E2` and `E3`, but that would be prone to errors, since it could get out of sync with the handlers we use. Thankfully LEAF can deduce the types we need automatically, we just need to show it our `error_handlers`:
[source,c++]
----
std::shared_ptr<leaf::polymorphic_context> ctx = leaf::make_shared_context(error_handlers);
----
The `polymorphic_context` type is an abstract base class that has the same members as any instance of the `context` class template, allowing us to erase its exact type. In this case what we're holding in `ctx` is a `context<E1, E2, E3>`, where `E1`, `E2` and `E3` were deduced automatically from the `error_handlers` tuple we passed to `make_shared_context`.
We're now ready to launch our asynchronous task:
[source,c++]
----
std::future<leaf::result<task_result>> launch_task() noexcept
{
return std::async(
std::launch::async,
[&]
{
std::shared_ptr<leaf::polymorphic_context> ctx = leaf::make_shared_context(error_handlers);
return leaf::capture(ctx, &task);
} );
}
----
[.text-right]
<<result>> | <<make_shared_context>> | <<capture>>
That's it! Later when we `get` the `std::future`, we can process the returned `result<task_result>` in a call to <<try_handle_some>>, using the `error_handlers` tuple we created earlier:
[source,c++]
----
//std::future<leaf::result<task_result>> fut;
fut.wait();
return leaf::try_handle_some(
[&]() -> leaf::result<void>
{
BOOST_LEAF_AUTO(r, fut.get());
//Success!
return { }
},
error_handlers );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
The reason this works is that in case the `leaf::result<T>` communicates a failure, it is able to hold a `shared_ptr<polymorphic_context>` object. That is why earlier instead of calling `task()` directly, we called `leaf::capture`: it calls the passed function and, in case that fails, it stores the `shared_ptr<polymorphic_context>` we created in the returned `result<T>`, which now doesn't just communicate the fact that an error has occurred, but also holds the `context` object that `try_handle_some` needs in order to supply a suitable handler with arguments.
NOTE: Follow this link to see a complete example program: https://github.com/boostorg/leaf/blob/master/example/capture_in_result.cpp?ts=4[capture_in_result.cpp].
[[tutorial-async_eh]]
==== Using Exception Handling
Let's assume we have an asynchronous `task` which produces a `task_result` but could also throw:
[source,c++]
----
task_result task();
----
Just like we saw in <<tutorial-async_result>>, first we will bind our error handlers in a `std::tuple`:
[source,c++]
----
auto handle_errors = std::make_tuple(
[](E1 e1, E2 e2)
{
//Deal with E1, E2
....
return { };
},
[](E3 e3)
{
//Deal with E3
....
return { };
} );
----
Launching the task looks the same as before, except that we don't use `result<T>`:
[source,c++]
----
std::future<task_result> launch_task()
{
return std::async(
std::launch::async,
[&]
{
std::shared_ptr<leaf::polymorphic_context> ctx = leaf::make_shared_context(&handle_error);
return leaf::capture(ctx, &task);
} );
}
----
[.text-right]
<<make_shared_context>> | <<capture>>
That's it! Later when we `get` the `std::future`, we can process the returned `task_result` in a call to <<try_catch>>, using the `error_handlers` we saved earlier, as if it was generated locally:
[source,c++]
----
//std::future<task_result> fut;
fut.wait();
return leaf::try_catch(
[&]
{
task_result r = fut.get(); // Throws on error
//Success!
},
error_handlers );
----
[.text-right]
<<try_catch>>
This works similarly to using `result<T>`, except that the `std::shared_ptr<polymorphic_context>` is transported in an exception object (of unspecified type which <<try_catch>> recognizes and then automatically unwraps the original exception).
NOTE: Follow this link to see a complete example program: https://github.com/boostorg/leaf/blob/master/example/capture_in_exception.cpp?ts=4[capture_in_exception.cpp].
'''
[[tutorial-classification]]
=== Classification of Failures
It is common for an interface to define an `enum` that lists all possible error codes that the API reports. The benefit of this approach is that the list is complete and usually well documented:
[source,c++]
----
enum error_code
{
....
read_error,
size_error,
eof_error,
....
};
----
The disadvantage of such flat enums is that they do not support handling of a whole class of failures. Consider the following LEAF error handler:
[source,c++]
----
....
[](leaf::match<error_code, size_error, read_error, eof_error>, leaf::e_file_name const & fn)
{
std::cerr << "Failed to access " << fn.value << std::endl;
},
....
----
[.text-right]
<<match>> | <<e_file_name>>
It will get called if the value of the `error_code` enum communicated with the failure is one of `size_error`, `read_error` or `eof_error`. In short, the idea is to handle any input error.
But what if later we add support for detecting and reporting a new type of input error, e.g. `permissions_error`? It is easy to add that to our `error_code` enum; but now our input error handler won't recognize this new input error -- and we have a bug.
If we can use exceptions, the situation is better because exception types can be organized in a hierarchy in order to classify failures:
[source,c++]
----
struct input_error: std::exception { };
struct read_error: input_error { };
struct size_error: input_error { };
struct eof_error: input_error { };
----
In terms of LEAF, our input error exception handler now looks like this:
[source,c++]
----
[](input_error &, leaf::e_file_name const & fn)
{
std::cerr << "Failed to access " << fn.value << std::endl;
},
----
This is future-proof, but still not ideal, because it is not possible to refine the classification of the failure after the exception object has been thrown.
LEAF supports a novel style of error handling where the classification of failures does not use error code values or exception type hierarchies. Instead of our `error_code` enum, we could define:
[source,c++]
----
....
struct input_error { };
struct read_error { };
struct size_error { };
struct eof_error { };
....
----
With this in place, we could define a function `file_read`:
[source,c++]
----
leaf::result<void> file_read( FILE & f, void * buf, int size )
{
int n = fread(buf, 1, size, &f);
if( ferror(&f) )
return leaf::new_error(input_error{}, read_error{}, leaf::e_errno{errno}); <1>
if( n!=size )
return leaf::new_error(input_error{}, eof_error{}); <2>
return { };
}
----
[.text-right]
<<result>> | <<new_error>> | <<e_errno>>
<1> This error is classified as `input_error` and `read_error`.
<2> This error is classified as `input_error` and `eof_error`.
Or, even better:
[source,c++]
----
leaf::result<void> file_read( FILE & f, void * buf, int size )
{
auto load = leaf::on_error(input_error{}); <1>
int n = fread(buf, 1, size, &f);
if( ferror(&f) )
return leaf::new_error(read_error{}, leaf::e_errno{errno}); <2>
if( n!=size )
return leaf::new_error(eof_error{}); <3>
return { };
}
----
[.text-right]
<<result>> | <<on_error>> | <<new_error>> | <<e_errno>>
<1> Any error escaping this scope will be classified as `input_error`
<2> In addition, this error is classified as `read_error`.
<3> In addition, this error is classified as `eof_error`.
This technique works just as well if we choose to use exception handling, we just call `leaf::throw_exception` instead of `leaf::new_error`:
[source,c++]
----
void file_read( FILE & f, void * buf, int size )
{
auto load = leaf::on_error(input_error{});
int n = fread(buf, 1, size, &f);
if( ferror(&f) )
leaf::throw_exception(read_error{}, leaf::e_errno{errno});
if( n!=size )
leaf::throw_exception(eof_error{});
}
----
[.text-right]
<<on_error>> | <<throw_exception>> | <<e_errno>>
NOTE: If the type of the first argument passed to `leaf::throw_exception` derives from `std::exception`, it will be used to initialize the thrown exception object. Here this is not the case, so the function returns a default-initialized `std::exception` object, while the first (and any other) argument is associated with the failure.
Now we can write a future-proof handler for any `input_error`:
[source,c++]
----
....
[](input_error, leaf::e_file_name const & fn)
{
std::cerr << "Failed to access " << fn.value << std::endl;
},
....
----
Remarkably, because the classification of the failure does not depend on error codes or on exception types, this error handler can be used with `try_catch` if we use exception handling, or with `try_handle_some`/`try_handle_all` if we do not.
'''
[[tutorial-exception_to_result]]
=== Converting Exceptions to `result<T>`
It is sometimes necessary to catch exceptions thrown by a lower-level library function, and report the error through different means, to a higher-level library which may not use exception handling.
TIP: Error handlers that take arguments of types that derive from `std::exception` work correctly -- regardless of whether the error object itself is thrown as an exception, or <<tutorial-loading,loaded>> into a <<context>>. The technique described here is only needed when the exception must be communicated through functions which are not exception-safe, or are compiled with exception handling disabled.
Suppose we have an exception type hierarchy and a function `compute_answer_throws`:
[source,c++]
----
class error_base: public std::exception { };
class error_a: public error_base { };
class error_b: public error_base { };
class error_c: public error_base { };
int compute_answer_throws()
{
switch( rand()%4 )
{
default: return 42;
case 1: throw error_a();
case 2: throw error_b();
case 3: throw error_c();
}
}
----
We can write a simple wrapper using `exception_to_result`, which calls `compute_answer_throws` and switches to `result<int>` for error handling:
[source,c++]
----
leaf::result<int> compute_answer() noexcept
{
return leaf::exception_to_result<error_a, error_b>(
[]
{
return compute_answer_throws();
} );
}
----
[.text-right]
<<result>> | <<exception_to_result>>
The `exception_to_result` template takes any number of exception types. All exception types thrown by the passed function are caught, and an attempt is made to convert the exception object to each of the specified types. Each successfully-converted slice of the caught exception object, as well as the return value of `std::current_exception`, are copied and <<tutorial-loading,loaded>>, and in the end the exception is converted to a `<<result,result>><T>` object.
(In our example, `error_a` and `error_b` slices as communicated as error objects, but `error_c` exceptions will still be captured by `std::exception_ptr`).
Here is a simple function which prints successfully computed answers, forwarding any error (originally reported by throwing an exception) to its caller:
[source,c++]
----
leaf::result<void> print_answer() noexcept
{
BOOST_LEAF_AUTO(answer, compute_answer());
std::cout << "Answer: " << answer << std::endl;
return { };
}
----
[.text-right]
<<result>> | <<BOOST_LEAF_AUTO>>
Finally, here is a scope that handles the errors -- it will work correctly regardless of whether `error_a` and `error_b` objects are thrown as exceptions or not.
[source,c++]
----
leaf::try_handle_all(
[]() -> leaf::result<void>
{
BOOST_LEAF_CHECK(print_answer());
return { };
},
[](error_a const & e)
{
std::cerr << "Error A!" << std::endl;
},
[](error_b const & e)
{
std::cerr << "Error B!" << std::endl;
},
[]
{
std::cerr << "Unknown error!" << std::endl;
} );
----
[.text-right]
<<try_handle_all>> | <<result>> | <<BOOST_LEAF_CHECK>>
NOTE: The complete program illustrating this technique is available https://github.com/boostorg/leaf/blob/master/example/exception_to_result.cpp?ts=4[here].
'''
[[tutorial-on_error_in_c_callbacks]]
=== Using `error_monitor` to Report Arbitrary Errors from C-callbacks
Communicating information pertaining to a failure detected in a C callback is tricky, because C callbacks are limited to a specific static signature, which may not use {CPP} types.
LEAF makes this easy. As an example, we'll write a program that uses Lua and reports a failure from a {CPP} function registered as a C callback, called from a Lua program. The failure will be propagated from {CPP}, through the Lua interpreter (written in C), back to the {CPP} function which called it.
C/{CPP} functions designed to be invoked from a Lua program must use the following signature:
[source,c]
----
int do_work( lua_State * L ) ;
----
Arguments are passed on the Lua stack (which is accessible through `L`). Results too are pushed onto the Lua stack.
First, let's initialize the Lua interpreter and register a function, `do_work`, as a C callback available for Lua programs to call:
[source,c++]
----
std::shared_ptr<lua_State> init_lua_state() noexcept
{
std::shared_ptr<lua_State> L(lua_open(), &lua_close); //<1>
lua_register(&*L, "do_work", &do_work); //<2>
luaL_dostring(&*L, "\ //<3>
\n function call_do_work()\
\n return do_work()\
\n end");
return L;
}
----
<1> Create a new `lua_State`. We'll use `std::shared_ptr` for automatic cleanup.
<2> Register the `do_work` {CPP} function as a C callback, under the global name `do_work`. With this, calls from Lua programs to `do_work` will land in the `do_work` {CPP} function.
<3> Pass some Lua code as a `C` string literal to Lua. This creates a global Lua function called `call_do_work`, which we will later ask Lua to execute.
Next, let's define our `enum` used to communicate `do_work` failures:
[source,c++]
----
enum do_work_error_code
{
ec1=1,
ec2
};
----
We're now ready to define the `do_work` callback function:
[source,c++]
----
int do_work( lua_State * L ) noexcept
{
bool success = rand() % 2; <1>
if( success )
{
lua_pushnumber(L, 42); <2>
return 1;
}
else
{
(void) leaf::new_error(ec1); <3>
return luaL_error(L, "do_work_error"); <4>
}
}
----
[.text-right]
<<new_error>> | <<error_id::load>>
<1> "Sometimes" `do_work` fails.
<2> In case of success, push the result on the Lua stack, return back to Lua.
<3> Generate a new `error_id` and associate a `do_work_error_code` with it. Normally, we'd return this in a `leaf::result<T>`, but the `do_work` function signature (required by Lua) does not permit this.
<4> Tell the Lua interpreter to abort the Lua program.
Now we'll write the function that calls the Lua interpreter to execute the Lua function `call_do_work`, which in turn calls `do_work`. We'll return `<<result,result>><int>`, so that our caller can get the answer in case of success, or an error:
[source,c++]
----
leaf::result<int> call_lua( lua_State * L )
{
lua_getfield(L, LUA_GLOBALSINDEX, "call_do_work");
error_monitor cur_err;
if( int err = lua_pcall(L, 0, 1, 0) ) <1>
{
auto load = leaf::on_error(e_lua_error_message{lua_tostring(L,1)}); <2>
lua_pop(L,1);
return cur_err.assigned_error_id().load(e_lua_pcall_error{err}); <3>
}
else
{
int answer = lua_tonumber(L, -1); <4>
lua_pop(L, 1);
return answer;
}
}
----
[.text-right]
<<result>> | <<on_error>> | <<error_monitor>>
<1> Ask the Lua interpreter to call the global Lua function `call_do_work`.
<2> `on_error` works as usual.
<3> `load` will use the `error_id` generated in our Lua callback. This is the same `error_id` the `on_error` uses as well.
<4> Success! Just return the `int` answer.
Finally, here is the `main` function which exercises `call_lua`, each time handling any failure:
[source,c++]
----
int main() noexcept
{
std::shared_ptr<lua_State> L=init_lua_state();
for( int i=0; i!=10; ++i )
{
leaf::try_handle_all(
[&]() -> leaf::result<void>
{
BOOST_LEAF_AUTO(answer, call_lua(&*L));
std::cout << "do_work succeeded, answer=" << answer << '\n'; <1>
return { };
},
[](do_work_error_code e) <2>
{
std::cout << "Got do_work_error_code = " << e << "!\n";
},
[](e_lua_pcall_error const & err, e_lua_error_message const & msg) <3>
{
std::cout << "Got e_lua_pcall_error, Lua error code = " << err.value << ", " << msg.value << "\n";
},
[](leaf::error_info const & unmatched)
{
std::cerr <<
"Unknown failure detected" << std::endl <<
"Cryptic diagnostic information follows" << std::endl <<
unmatched;
} );
}
----
[.text-right]
<<try_handle_all>> | <<result>> | <<BOOST_LEAF_AUTO>> | <<error_info>>
<1> If the call to `call_lua` succeeded, just print the answer.
<2> Handle `do_work` failures.
<3> Handle all other `lua_pcall` failures.
NOTE: Follow this link to see the complete program: https://github.com/boostorg/leaf/blob/master/example/lua_callback_result.cpp?ts=4[lua_callback_result.cpp].
TIP: When using Lua with {CPP}, we need to protect the Lua interpreter from exceptions that may be thrown from {CPP} functions installed as `lua_CFunction` callbacks. Here is the program from this section rewritten to use a {CPP} exception to safely communicate errors out of the `do_work` function: https://github.com/boostorg/leaf/blob/master/example/lua_callback_eh.cpp?ts=4[lua_callback_eh.cpp].
''''
[[tutorial-diagnostic_information]]
=== Diagnostic Information
LEAF is able to automatically generate diagnostic messages that include information about all error objects available to error handlers:
[source,c++]
----
enum class error_code
{
read_error,
write_error
};
....
leaf::try_handle_all(
[]() -> leaf::result<void> <1>
{
...
return leaf::new_error( error_code::write_error, leaf::e_file_name{ "file.txt" } );
},
[]( leaf::match<error_code, error_code::read_error> ) <2>
{
std::cerr << "Read error!" << std::endl;
},
[]( leaf::verbose_diagnostic_info const & info ) <3>
{
std::cerr << "Unrecognized error detected, cryptic diagnostic information follows.\n" << info;
} );
----
<1> We handle all failures that occur in this try block.
<2> One or more error handlers that should handle all possible failures.
<3> The "catch all" error handler is required by `try_handle_all`. It will be called if LEAF is unable to use another error handler.
The `verbose_diagnostic_info` output for the snippet above tells us that we got an `error_code` with value `1` (`write_error`), and an object of type `e_file_name` with `"file.txt"` stored in its `.value`:
----
Unrecognized error detected, cryptic diagnostic information follows.
leaf::verbose_diagnostic_info for Error ID = 1:
[with Name = error_code]: 1
Unhandled error objects:
[with Name = boost::leaf::e_file_name]: file.txt
----
To print each error object, LEAF attempts to bind an unqualified call to `operator<<`, passing a `std::ostream` and the error object. If that fails, it will also attempt to bind `operator<<` that takes the `.value` of the error type. If that also does not compile, the error object value will not appear in diagnostic messages, though LEAF will still print its type.
Even with error types that define a printable `.value`, the user may still want to overload `operator<<` for the enclosing `struct`, e.g.:
[source,c++]
----
struct e_errno
{
int value;
friend std::ostream & operator<<( std::ostream & os, e_errno const & e )
{
return os << "errno = " << e.value << ", \"" << strerror(e.value) << '"';
}
};
----
The `e_errno` type above is designed to hold `errno` values. The defined `operator<<` overload will automatically include the output from `strerror` when `e_errno` values are printed (LEAF defines `e_errno` in `<boost/leaf/common.hpp>`, together with other commonly-used error types).
Using `verbose_diagnostic_info` comes at a cost. Normally, when the program attempts to communicate error objects of types which are not used in any error handling scope in the current call stack, they are discarded, which saves cycles. However, if an error handler is provided that takes `verbose_diagnostic_info` argument, before such objects are discarded, they are printed and appended to a `std::string` (this is the case with `e_file_name` in our example above). Such objects appear under `Unhandled error objects` in the output from `verbose_diagnostic_info`.
If handling `verbose_diagnostic_info` is considered too costly, use `diagnostic_info` instead:
[source,c++]
----
leaf::try_handle_all(
[]() -> leaf::result<void>
{
...
return leaf::new_error( error_code::write_error, leaf::e_file_name{ "file.txt" } );
},
[]( leaf::match<error_code, error_code::read_error> )
{
std::cerr << "Read error!" << std::endl;
},
[]( leaf::diagnostic_info const & info )
{
std::cerr << "Unrecognized error detected, cryptic diagnostic information follows.\n" << info;
} );
----
In this case, the output may look like this:
----
Unrecognized error detected, cryptic diagnostic information follows.
leaf::diagnostic_info for Error ID = 1:
[with Name = error_code]: 1
Detected 1 attempt to communicate an unexpected error object of type [with Name = boost::leaf::e_file_name]
----
Notice how the diagnostic information for `e_file_name` changed: LEAF no longer prints it before discarding it, and so `diagnostic_info` can only inform about the type of the discarded object, but not its value.
TIP: The automatically-generated diagnostic messages are developer-friendly, but not user-friendly. Therefore, `operator<<` overloads for error types should only print technical information in English, and should not attempt to localize strings or to format a user-friendly message; this should be done in error handling functions specifically designed for that purpose.
'''
[[tutorial-std_error_code]]
=== Working with `std::error_code`, `std::error_condition`
==== Introduction
The relationship between `std::error_code` and `std::error_condition` is not easily understood from reading the standard specifications. This section explains how they're supposed to be used, and how LEAF interacts with them.
The idea behind `std::error_code` is to encode both an integer value representing an error code, as well as the domain of that value. The domain is represented by a `std::error_category` [underline]#reference#. Conceptually, a `std::error_code` is like a `pair<std::error_category const &, int>`.
Let's say we have this `enum`:
[source,c++]
----
enum class libfoo_error
{
e1 = 1,
e2,
e3
};
----
We want to be able to transport `libfoo_error` values in `std::error_code` objects. This erases their static type, which enables them to travel freely across API boundaries. To this end, we must define a `std::error_category` that represents our `libfoo_error` type:
[source,c++]
----
std::error_category const & libfoo_error_category()
{
struct category: std::error_category
{
char const * name() const noexcept override
{
return "libfoo";
}
std::string message(int code) const override
{
switch( libfoo_error(code) )
{
case libfoo_error::e1: return "e1";
case libfoo_error::e2: return "e2";
case libfoo_error::e3: return "e3";
default: return "error";
}
}
};
static category c;
return c;
}
----
We also need to inform the standard library that `libfoo_error` is compatible with `std::error_code`, and provide a factory function which can be used to make `std::error_code` objects out of `libfoo_error` values:
[source,c++]
----
namespace std
{
template <>
struct is_error_code_enum<libfoo_error>: std::true_type
{
};
}
std::error_code make_error_code(libfoo_error e)
{
return std::error_code(int(e), libfoo_error_category());
}
----
With this in place, if we receive a `std::error_code`, we can easily check if it represents some of the `libfoo_error` values we're interested in:
[source,c++]
----
std::error_code f();
....
auto ec = f();
if( ec == libfoo_error::e1 || ec == libfoo_error::e2 )
{
// We got either a libfoo_error::e1 or a libfoo_error::e2
}
----
This works because the standard library detects that `std::is_error_code_enum<libfoo_error>::value` is `true`, and then uses `make_error_code` to create a `std::error_code` object it actually uses to compare to `ec`.
So far so good, but remember, the standard library defines another type also, `std::error_condition`. The first confusing thing is that in terms of its physical representation, `std::error_condition` is identical to `std::error_code`; that is, it is also like a pair of `std::error_category` reference and an `int`. Why do we need two different types which use identical physical representation?
The key to answering this question is to understand that `std::error_code` objects are designed to be returned from functions to indicate failures. In contrast, `std::error_condition` objects are [underline]#never# supposed to be communicated; their purpose is to interpret the `std::error_code` values being communicated. The idea is that in a given program there may be multiple different "physical" (maybe platform-specific) `std::error_code` values which all indicate the same "logical" `std::error_condition`.
This leads us to the second confusing thing about `std::error_condition`: it uses the same `std::error_category` type, but for a completely different purpose: to specify what `std::error_code` values are equivalent to what `std::error_condition` values.
Let's say that in addition to `libfoo`, our program uses another library, `libbar`, which communicates failures in terms of `std::error_code` with a different error category. Perhaps `libbar_error` looks like this:
[source,c++]
----
enum class libbar_error
{
e1 = 1,
e2,
e3,
e4
};
// Boilerplate omitted:
// - libbar_error_category()
// - specialization of std::is_error_code_enum
// - make_error_code factory function for libbar_error.
----
We can now use `std::error_condition` to define the _logical_ error conditions represented by the `std::error_code` values communicated by `libfoo` and `libbar`:
[source,c++]
----
enum class my_error_condition <1>
{
c1 = 1,
c2
};
std::error_category const & libfoo_error_category() <2>
{
struct category: std::error_category
{
char const * name() const noexcept override
{
return "my_error_condition";
}
std::string message(int cond) const override
{
switch( my_error_condition(code) )
{
case my_error_condition::c1: return "c1";
case my_error_condition::c2: return "c2";
default: return "error";
}
}
bool equivalent(std::error_code const & code, int cond) const noexcept
{
switch( my_error_condition(cond) )
{
case my_error_condition::c1: <3>
return
code == libfoo_error::e1 ||
code == libbar_error::e3 ||
code == libbar_error::e4;
case my_error_condition::c2: <4>
return
code == libfoo_error::e2 ||
code == libbar_error::e1 ||
code == libbar_error::e2;
default:
return false;
}
}
};
static category c;
return c;
}
namespace std
{
template <> <5>
class is_error_condition_enum<my_error_condition>: std::true_type
{
};
}
std::error_condition make_error_condition(my_error_condition e) <6>
{
return std::error_condition(int(e), my_error_condition_error_category());
}
----
<1> Enumeration of the two logical error conditions, `c1` and `c2`.
<2> Define the `std::error_category` for `std::error_condition` objects that represent a `my_error_condition`.
<3> Here we specify that any of `libfoo:error::e1`, `libbar_error::e3` and `libbar_error::e4` are logically equivalent to `my_error_condition::c1`, and that...
<4> ...any of `libfoo:error::e2`, `libbar_error::e1` and `libbar_error::e2` are logically equivalent to `my_error_condition::c2`.
<5> This specialization tells the standard library that the `my_error_condition` enum is designed to be used with `std::error_condition`.
<6> The factory function to make `std::error_condition` objects out of `my_error_condition` values.
Phew!
Now, if we have a `std::error_code` object `ec`, we can easily check if it is equivalent to `my_error_condition::c1` like so:
[source,c++]
----
if( ec == my_error_condition::c1 )
{
// We have a c1 in our hands
}
----
Again, remember that beyond defining the `std::error_category` for `std::error_condition` objects initialized with a `my_error_condition` value, we don't need to interact with the actual `std::error_condition` instances: they're created when needed to compare to a `std::error_code`, and that's pretty much all they're good for.
==== Support in LEAF
The `match` predicate can be used as an argument to a LEAF error handler to match a `std::error_code` with a given error condition. For example, to handle `my_error_condition::c1` (see above), we could use:
[source,c++]
----
leaf::try_handle_some(
[]
{
return f(); // returns leaf::result<T>
},
[]( leaf::match<std::error_code, my_error_condition::c1> m )
{
assert(m.matched == my_error_condition::c1);
....
} );
----
See <<match>> for more examples.
'''
[[tutorial-boost_exception_integration]]
=== Boost Exception Integration
Instead of the https://www.boost.org/doc/libs/release/libs/exception/doc/get_error_info.html[`boost::get_error_info`] API defined by Boost Exception, it is possible to use LEAF error handlers directly. Consider the following use of `boost::get_error_info`:
[source,c++]
----
typedef boost::error_info<struct my_info_, int> my_info;
void f(); // Throws using boost::throw_exception
void g()
{
try
{
f();
},
catch( boost::exception & e )
{
if( int const * x = boost::get_error_info<my_info>(e) )
std::cerr << "Got my_info with value = " << *x;
} );
}
----
We can rewrite `g` to access `my_info` using LEAF:
[source,c++]
----
#include <boost/leaf/handle_errors.hpp>
void g()
{
leaf::try_catch(
[]
{
f();
},
[]( my_info x )
{
std::cerr << "Got my_info with value = " << x.value();
} );
}
----
[.text-right]
<<try_catch>>
Taking `my_info` means that the handler will only be selected if the caught exception object carries `my_info` (which LEAF accesses via `boost::get_error_info`).
The use of <<match>> is also supported:
[source,c++]
----
void g()
{
leaf::try_catch(
[]
{
f();
},
[]( leaf::match_value<my_info, 42> )
{
std::cerr << "Got my_info with value = 42";
} );
}
----
Above, the handler will be selected if the caught exception object carries `my_info` with `.value()` equal to 42.
[[example]]
== Examples
See https://github.com/boostorg/leaf/tree/master/example[github].
[[synopsis]]
== Synopsis
This section lists each public header file in LEAF, documenting the definitions it provides.
LEAF headers are designed to minimize coupling:
* Headers needed to report or forward but not handle errors are lighter than headers providing error handling functionality.
* Headers that provide exception handling or throwing functionality are separate from headers that provide error handling or reporting but do not use exceptions.
A standalone single-header option is available; please see <<distribution>>.
'''
[[synopsis-reporting]]
=== Error Reporting
[[error.hpp]]
==== `error.hpp`
====
.#include <boost/leaf/error.hpp>
[source,c++]
----
namespace boost { namespace leaf {
class error_id
{
public:
error_id() noexcept;
template <class Enum>
error_id( Enum e, typename std::enable_if<std::is_error_code_enum<Enum>::value, Enum>::type * = 0 ) noexcept;
error_id( std::error_code const & ec ) noexcept;
int value() const noexcept;
explicit operator bool() const noexcept;
std::error_code to_error_code() const noexept;
friend bool operator==( error_id a, error_id b ) noexcept;
friend bool operator!=( error_id a, error_id b ) noexcept;
friend bool operator<( error_id a, error_id b ) noexcept;
template <class... Item>
error_id load( Item && ... item ) const noexcept;
friend std::ostream & operator<<( std::ostream & os, error_id x );
};
bool is_error_id( std::error_code const & ec ) noexcept;
template <class... Item>
error_id new_error( Item && ... item ) noexcept;
error_id current_error() noexcept;
//////////////////////////////////////////
class polymorphic_context
{
protected:
polymorphic_context() noexcept = default;
~polymorphic_context() noexcept = default;
public:
virtual void activate() noexcept = 0;
virtual void deactivate() noexcept = 0;
virtual bool is_active() const noexcept = 0;
virtual void propagate( error_id ) noexcept = 0;
virtual void print( std::ostream & ) const = 0;
};
//////////////////////////////////////////
template <class Ctx>
class context_activator
{
context_activator( context_activator const & ) = delete;
context_activator & operator=( context_activator const & ) = delete;
public:
explicit context_activator( Ctx & ctx ) noexcept;
context_activator( context_activator && ) noexcept;
~context_activator() noexcept;
};
template <class Ctx>
context_activator<Ctx> activate_context( Ctx & ctx ) noexcept;
template <class R>
struct is_result_type: std::false_type
{
};
template <class R>
struct is_result_type<R const>: is_result_type<R>
{
};
} }
#define BOOST_LEAF_ASSIGN(v, r)\
auto && <<temp>> = r;\
if( !<<temp>> )\
return <<temp>>.error();\
v = std::forward<decltype(<<temp>>)>(<<temp>>).value()
#define BOOST_LEAF_AUTO(v, r)\
BOOST_LEAF_ASSIGN(auto v, r)
#define BOOST_LEAF_CHECK(r)\
auto && <<temp>> = r;\
if( <<temp>> )\
;\
else\
return <<temp>>.error()
#define BOOST_LEAF_NEW_ERROR <<exact-definition-unspecified>>
----
[.text-right]
Reference: <<error_id>> | <<is_error_id>> | <<new_error>> | <<current_error>> | <<polymorphic_context>> | <<context_activator>> | <<activate_context>> | <<is_result_type>> | <<BOOST_LEAF_ASSIGN>> | <<BOOST_LEAF_AUTO>> | <<BOOST_LEAF_CHECK>> | <<BOOST_LEAF_NEW_ERROR>>
====
[[common.hpp]]
==== `common.hpp`
====
.#include <boost/leaf/common.hpp>
[source,c++]
----
namespace boost { namespace leaf {
struct e_api_function { char const * value; };
struct e_file_name { std::string value; };
struct e_type_info_name { char const * value; };
struct e_at_line { int value; };
struct e_errno
{
int value;
explicit e_errno(int value=errno);
friend std::ostream & operator<<(std::ostream &, e_errno const &);
};
namespace windows
{
struct e_LastError
{
unsigned value;
explicit e_LastError(unsigned value);
#if BOOST_LEAF_CFG_WIN32
e_LastError();
friend std::ostream & operator<<(std::ostream &, e_LastError const &);
#endif
};
}
} }
----
[.text-right]
Reference: <<e_api_function>> | <<e_file_name>> | <<e_at_line>> | <<e_type_info_name>> | <<e_source_location>> | <<e_errno>> | <<e_LastError>>
====
[[result.hpp]]
==== `result.hpp`
====
.#include <boost/leaf/result.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class T>
class result
{
public:
result() noexcept;
result( T && v ) noexcept;
result( T const & v );
template <class U>
result( U && u, <<enabled_if_T_can_be_inited_with_U>> );
result( error_id err ) noexcept;
result( std::shared_ptr<polymorphic_context> && ctx ) noexcept;
template <class Enum>
result( Enum e, typename std::enable_if<std::is_error_code_enum<Enum>::value, Enum>::type * = 0 ) noexcept;
result( std::error_code const & ec ) noexcept;
result( result && r ) noexcept;
template <class U>
result( result<U> && r ) noexcept;
result & operator=( result && r ) noexcept;
template <class U>
result & operator=( result<U> && r ) noexcept;
bool has_value() const noexcept;
bool has_error() const noexcept;
explicit operator bool() const noexcept;
T const & value() const;
T & value();
T const * operator->() const noexcept;
T * operator->() noexcept;
T const & operator*() const noexcept;
T & operator*() noexcept;
<<unspecified-type>> error() noexcept;
template <class... Item>
error_id load( Item && ... item ) noexcept;
};
template <>
class result<void>
{
public:
result() noexcept;
result( error_id err ) noexcept;
result( std::shared_ptr<polymorphic_context> && ctx ) noexcept;
template <class Enum>
result( Enum e, typename std::enable_if<std::is_error_code_enum<Enum>::value, Enum>::type * = 0 ) noexcept;
result( std::error_code const & ec ) noexcept;
result( result && r ) noexcept;
template <class U>
result( result<U> && r ) noexcept;
result & operator=( result && r ) noexcept;
template <class U>
result & operator=( result<U> && r ) noexcept;
explicit operator bool() const noexcept;
void value() const;
<<unspecified-type>> error() noexcept;
template <class... Item>
error_id load( Item && ... item ) noexcept;
};
struct bad_result: std::exception { };
template <class T>
struct is_result_type<result<T>>: std::true_type
{
};
} }
----
[.text-right]
Reference: <<result>> | <<is_result_type>>
====
[[on_error.hpp]]
==== `on_error.hpp`
====
[source,c++]
.#include <boost/leaf/on_error.hpp>
----
namespace boost { namespace leaf {
template <class... Item>
<<unspecified-type>> on_error( Item && ... e ) noexcept;
class error_monitor
{
public:
error_monitor() noexcept;
error_id check() const noexcept;
error_id assigned_error_id() const noexcept;
};
} }
----
[.text-right]
Reference: <<on_error>> | <<error_monitor>>
====
[[exception.hpp]]
==== `exception.hpp`
====
.#include <boost/leaf/exception.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class Ex, class... E> <1>
[[noreturn]] void throw_exception( Ex &&, E && ... );
template <class E1, class... E> <2>
[[noreturn]] void throw_exception( E1 &&, E && ... );
[[noreturn]] void throw_exception();
template <class Ex, class... E> <1>
[[noreturn]] void throw_exception( error_id id, Ex &&, E && ... );
template <class E1, class... E> <2>
[[noreturn]] void throw_exception( error_id id, E1 &&, E && ... );
[[noreturn]] void throw_exception( error_id id );
template <class... Ex, class F>
<<result<T>-deduced>> exception_to_result( F && f ) noexcept;
} }
#define BOOST_LEAF_THROW_EXCEPTION <<exact-definition-unspecified>>
----
[.text-right]
Reference: <<throw_exception>> | <<BOOST_LEAF_THROW_EXCEPTION>>
<1> Only enabled if std::is_base_of<std::exception, Ex>::value.
<2> Only enabled if !std::is_base_of<std::exception, E1>::value.
====
==== `capture.hpp`
====
[source,c++]
.#include <boost/leaf/capture.hpp>
----
namespace boost { namespace leaf {
template <class F, class... A>
decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...))
capture(std::shared_ptr<polymorphic_context> && ctx, F && f, A... a);
} }
----
[.text-right]
Reference: <<capture>> | <<exception_to_result>>
====
'''
[[tutorial-handling]]
=== Error Handling
[[context.hpp]]
==== `context.hpp`
====
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... E>
class context
{
context( context const & ) = delete;
context & operator=( context const & ) = delete;
public:
context() noexcept;
context( context && x ) noexcept;
~context() noexcept;
void activate() noexcept;
void deactivate() noexcept;
bool is_active() const noexcept;
void propagate( error_id ) noexcept;
void print( std::ostream & os ) const;
template <class R, class... H>
R handle_error( R &, H && ... ) const;
};
//////////////////////////////////////////
template <class... H>
using context_type_from_handlers = typename <<unspecified>>::type;
template <class... H>
BOOST_LEAF_CONSTEXPR context_type_from_handlers<H...> make_context() noexcept;
template <class... H>
BOOST_LEAF_CONSTEXPR context_type_from_handlers<H...> make_context( H && ... ) noexcept;
template <class... H>
context_ptr make_shared_context() noexcept;
template <class... H>
context_ptr make_shared_context( H && ... ) noexcept;
} }
----
[.text-right]
Reference: <<context>> | <<context_type_from_handlers>> | <<make_context>> | <<make_shared_context>>
====
[[handle_errors.hpp]]
==== `handle_errors.hpp`
====
.#include <boost/leaf/handle_errors.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()().value())>::type
try_handle_all( TryBlock && try_block, H && ... h );
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()())>::type
try_handle_some( TryBlock && try_block, H && ... h );
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()())>::type
try_catch( TryBlock && try_block, H && ... h );
//////////////////////////////////////////
class error_info
{
//No public constructors
public:
error_id error() const noexcept;
bool exception_caught() const noexcept;
std::exception const * exception() const noexcept;
friend std::ostream & operator<<( std::ostream & os, error_info const & x );
};
class diagnostic_info: public error_info
{
//No public constructors
friend std::ostream & operator<<( std::ostream & os, diagnostic_info const & x );
};
class verbose_diagnostic_info: public error_info
{
//No public constructors
friend std::ostream & operator<<( std::ostream & os, diagnostic_info const & x );
};
} }
----
[.text-right]
Reference: <<try_handle_all>> | <<try_handle_some>> | <<try_catch>> | <<error_info>> | <<diagnostic_info>> | <<verbose_diagnostic_info>>
====
[[handle_errors.hpp]]
==== `to_variant.hpp`
====
.#include <boost/leaf/to_variant.hpp>
[source,c++]
----
namespace boost { namespace leaf {
// Requires at least C++17
template <class... E, class TryBlock>
std::variant<
typename std::decay<decltype(std::declval<TryBlock>()().value())>::type
std::tuple<
std::optional<E>...>>
to_variant( TryBlock && try_block );
} }
----
[.text-right]
Reference: <<to_variant>>
====
[[pred.hpp]]
==== `pred.hpp`
====
.#include <boost/leaf/pred.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class T>
struct is_predicate: std::false_type
{
};
template <class E, auto... V>
struct match
{
E matched;
// Other members not specified
};
template <class E, auto... V>
struct is_predicate<match<E, V...>>: std::true_type
{
};
template <class E, auto... V>
struct match_value
{
E matched;
// Other members not specified
};
template <class E, auto... V>
struct is_predicate<match_value<E, V...>>: std::true_type
{
};
template <auto, auto...>
struct match_member;
template <class E, class T, T E::* P, auto... V>
struct member<P, V...>
{
E matched;
// Other members not specified
};
template <auto P, auto... V>
struct is_predicate<match_member<P, V...>>: std::true_type
{
};
template <class... Ex>
struct catch_
{
std::exception const & matched;
// Other members not specified
};
template <class Ex>
struct catch_<Ex>
{
Ex const & matched;
// Other members not specified
};
template <class... Ex>
struct is_predicate<catch_<Ex...>>: std::true_type
{
};
template <class Pred>
struct if_not
{
E matched;
// Other members not specified
};
template <class Pred>
struct is_predicate<if_not<Pred>>: std::true_type
{
};
template <class ErrorCodeEnum>
bool category( std::error_code const & ec ) noexcept;
template <class Enum, class EnumType = Enum>
struct condition;
} }
----
[.text-right]
Reference: <<match>> | <<match_value>> | <<match_member>> | <<catch_>> | <<if_not>> | <<category,`category`>> | <<condition,`condition`>>
====
[[functions]]
== Reference: Functions
TIP: The contents of each Reference section are organized alphabetically.
'''
[[activate_context]]
=== `activate_context`
.#include <boost/leaf/error.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class Ctx>
context_activator<Ctx> activate_context( Ctx & ctx ) noexcept
{
return context_activator<Ctx>(ctx);
}
} }
----
[.text-right]
<<context_activator>>
.Example:
[source,c++]
----
leaf::context<E1, E2, E3> ctx;
{
auto active_context = activate_context(ctx); <1>
} <2>
----
<1> Activate `ctx`.
<2> Automatically deactivate `ctx`.
'''
[[capture]]
=== `capture`
.#include <boost/leaf/capture.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class F, class... A>
decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...))
capture(std::shared_ptr<polymorphic_context> && ctx, F && f, A... a);
} }
----
[.text-right]
<<polymorphic_context>>
This function can be used to capture error objects stored in a <<context>> in one thread and transport them to a different thread for handling, either in a `<<result,result>><T>` object or in an exception.
Returns: :: The same type returned by `F`.
Effects: :: Uses an internal <<context_activator>> to <<context::activate>> `*ctx`, then invokes `std::forward<F>(f)(std::forward<A>(a)...)`. Then:
+
--
* If the returned value `r` is not a `result<T>` type (see <<is_result_type>>), it is forwarded to the caller.
* Otherwise:
** If `!r`, the return value of `capture` is initialized with `ctx`;
+
NOTE: An object of type `leaf::<<result,result>><T>` can be initialized with a `std::shared_ptr<leaf::polymorphic_context>`.
+
** otherwise, it is initialized with `r`.
--
+
In case `f` throws, `capture` catches the exception in a `std::exception_ptr`, and throws a different exception of unspecified type that transports both the `std::exception_ptr` as well as `ctx`. This exception type is recognized by <<try_catch>>, which automatically unpacks the original exception and propagates the contents of `*ctx` (presumably, in a different thread).
TIP: See also <<tutorial-async>> from the Tutorial.
'''
[[context_type_from_handlers]]
=== `context_type_from_handlers`
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... H>
using context_type_from_handlers = typename <<unspecified>>::type;
} }
----
.Example:
[source,c++]
----
auto error_handlers = std::make_tuple(
[](e_this const & a, e_that const & b)
{
....
},
[](leaf::diagnostic_info const & info)
{
....
},
.... );
leaf::context_type_from_handlers<decltype(error_handlers)> ctx; <1>
----
<1> `ctx` will be of type `context<e_this, e_that>`, deduced automatically from the specified error handlers.
TIP: Alternatively, a suitable context may be created by calling <<make_context>>, or allocated dynamically by calling <<make_shared_context>>.
'''
[[current_error]]
=== `current_error`
.#include <boost/leaf/error.hpp>
[source,c++]
----
namespace boost { namespace leaf {
error_id current_error() noexcept;
} }
----
Returns: :: The `error_id` value returned the last time <<new_error>> was invoked from the calling thread.
TIP: See also <<on_error>>.
'''
[[exception_to_result]]
=== `exception_to_result`
[source,c++]
.#include <boost/leaf/exception.hpp>
----
namespace boost { namespace leaf {
template <class... Ex, class F>
<<result<T>-deduced>> exception_to_result( F && f ) noexcept;
} }
----
This function can be used to catch exceptions from a lower-level library and convert them to `<<result,result>><T>`.
Returns: :: Where `f` returns a type `T`, `exception_to_result` returns `leaf::result<T>`.
Effects: ::
. Catches all exceptions, then captures `std::current_exception` in a `std::exception_ptr` object, which is <<tutorial-loading,loaded>> with the returned `result<T>`.
. Attempts to convert the caught exception, using `dynamic_cast`, to each type `Ex~i~` in `Ex...`. If the cast to `Ex~i~` succeeds, the `Ex~i~` slice of the caught exception is loaded with the returned `result<T>`.
TIP: An error handler that takes an argument of an exception type (that is, of a type that derives from `std::exception`) will work correctly whether the object is thrown as an exception or communicated via <<new_error>> (or converted using `exception_to_result`).
.Example:
[source,c++]
----
int compute_answer_throws();
//Call compute_answer, convert exceptions to result<int>
leaf::result<int> compute_answer()
{
return leaf::exception_to_result<ex_type1, ex_type2>(compute_answer_throws());
}
----
At a later time we can invoke <<try_handle_some>> / <<try_handle_all>> as usual, passing handlers that take `ex_type1` or `ex_type2`, for example by reference:
[source,c++]
----
return leaf::try_handle_some(
[] -> leaf::result<void>
{
BOOST_LEAF_AUTO(answer, compute_answer());
//Use answer
....
return { };
},
[](ex_type1 & ex1)
{
//Handle ex_type1
....
return { };
},
[](ex_type2 & ex2)
{
//Handle ex_type2
....
return { };
},
[](std::exception_ptr const & p)
{
//Handle any other exception from compute_answer.
....
return { };
} );
----
[.text-right]
<<try_handle_some>> | <<result>> | <<BOOST_LEAF_AUTO>>
WARNING: When a handler takes an argument of an exception type (that is, a type that derives from `std::exception`), if the object is thrown, the argument will be matched dynamically (using `dynamic_cast`); otherwise (e.g. after being converted by `exception_to_result`) it will be matched based on its static type only (which is the same behavior used for types that do not derive from `std::exception`).
TIP: See also <<tutorial-exception_to_result>> from the tutorial.
'''
[[make_context]]
=== `make_context`
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... H>
context_type_from_handlers<H...> make_context() noexcept
{
return { };
}
template <class... H>
context_type_from_handlers<H...> make_context( H && ... ) noexcept
{
return { };
}
} }
----
[.text-right]
<<context_type_from_handlers>>
.Example:
[source,c++]
----
auto ctx = leaf::make_context( <1>
[]( e_this ) { .... },
[]( e_that ) { .... } );
----
<1> `decltype(ctx)` is `leaf::context<e_this, e_that>`.
'''
[[make_shared_context]]
=== `make_shared_context`
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... H>
context_ptr make_shared_context() noexcept
{
return std::make_shared<leaf_detail::polymorphic_context_impl<context_type_from_handlers<H...>>>();
}
template <class... H>
context_ptr make_shared_context( H && ... ) noexcept
{
return std::make_shared<leaf_detail::polymorphic_context_impl<context_type_from_handlers<H...>>>();
}
} }
----
[.text-right]
<<context_type_from_handlers>>
TIP: See also <<tutorial-async>> from the tutorial.
'''
[[new_error]]
=== `new_error`
.#include <boost/leaf/error.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... Item>
error_id new_error(Item && ... item) noexcept;
} }
----
Requires: :: Each of the `Item...` types must be no-throw movable.
Effects: :: As if:
+
[source,c++]
----
error_id id = <<generate-new-unique-id>>;
return id.load(std::forward<Item>(item)...);
----
Returns: :: A new `error_id` value, which is unique across the entire program.
Ensures: :: `id.value()!=0`, where `id` is the returned `error_id`.
NOTE: `new_error` discards error objects which are not used in any active error handling calling scope.
CAUTION: When loaded into a `context`, an error object of a type `E` will overwrite the previously loaded object of type `E`, if any.
'''
[[on_error]]
=== `on_error`
.#include <boost/leaf/on_error.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... Item>
<<unspecified-type>> on_error(Item && ... item) noexcept;
} }
----
Requires: :: Each of the `Item...` types must be no-throw movable.
Effects: :: All `item...` objects are forwarded and stored, together with the value returned from `std::unhandled_exceptions`, into the returned object of unspecified type, which should be captured by `auto` and kept alive in the calling scope. When that object is destroyed, if an error has occurred since `on_error` was invoked, LEAF will process the stored items to obtain error objects to be associated with the failure.
+
On error, LEAF first needs to deduce an `error_id` value `err` to associate error objects with. This is done using the following logic:
+
--
* If <<new_error>> was invoked (by the calling thread) since the object returned by `on_error` was created, `err` is initialized with the value returned by <<current_error>>;
* Otherwise, if `std::unhandled_exceptions` returns a greater value than it returned during initialization, `err` is initialized with the value returned by <<new_error>>;
* Otherwise, the stored `item...` objects are discarded and no further action is taken (no error has occurred).
--
+
Next, LEAF proceeds similarly to:
+
[source,c++]
----
err.load(std::forward<Item>(item)...);
----
+
The difference is that unlike <<error_id::load>>, `on_error` will not overwrite any error objects already associated with `err`.
TIP: See <<tutorial-on_error>> from the Tutorial.
'''
[[throw_exception]]
=== `throw_exception`
[source,c++]
.#include <boost/leaf/exception.hpp>
----
namespace boost { namespace leaf {
template <class Ex, class... E> <1>
[[noreturn]] void throw_exception( Ex && ex, E && ... e );
template <class E1, class... E> <2>
[[noreturn]] void throw_exception( E1 && e1, E && ... e );
[[noreturn]] void throw_exception(); <3>
template <class Ex, class... E> <4>
[[noreturn]] void throw_exception( error_id id, Ex && ex, E && ... e );
template <class E1, class... E> <5>
[[noreturn]] void throw_exception( error_id id, E1 && e1, E && ... e );
[[noreturn]] void throw_exception( error_id id ); <6>
} }
----
The `throw_exception` function is overloaded: it can be invoked with no arguments, or else there are several alternatives, selected using `std::enable_if` based on the type of the passed arguments. All overloads throw an exception:
<1> Selected if the first argument is not of type `error_id` and is an exception object, that is, iff `Ex` derives publicly from `std::exception`. In this case the thrown exception is of unspecified type which derives publicly from `Ex` *and* from class <<error_id>>, such that:
* its `Ex` subobject is initialized by `std::forward<Ex>(ex)`;
* its `error_id` subobject is initialized by `<<new_error,new_error>>(std::forward<E>(e)...`).
<2> Selected if the first argument is not of type `error_id` and is not an exception object. In this case the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by `<<new_error,new_error>>(std::forward<E1>(e1), std::forward<E>(e)...`).
<3> If the fuction is invoked without arguments, the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by `<<new_error,new_error>>()`.
<4> Selected if the first argument is of type `error_id` and the second argument is an exception object, that is, iff `Ex` derives publicly from `std::exception`. In this case the thrown exception is of unspecified type which derives publicly from `Ex` *and* from class <<error_id>>, such that:
** its `Ex` subobject is initialized by `std::forward<Ex>(ex)`;
** its `error_id` subobject is initialized by `id.<<error_id::load>>(std::forward<E>(e)...)`.
<5> Selected if the first argument is of type `error_id` and the second argument is not an exception object. In this case the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by `id.<<error_id::load>>(std::forward<E1>(e1), std::forward<E>(e)...`).
<6> If `exception` is invoked with just an `error_id` object, the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by copying from `id`.
NOTE: The first three overloads throw an exception object that is associated with a new `error_id`. The second three overloads throw an exception object that is associated with the specified `error_id`.
.Example 1:
[source,c++]
----
struct my_exception: std::exception { };
leaf::throw_exception(my_exception{}); <1>
----
<1> Throws an exception of a type that derives from `error_id` and from `my_exception` (because `my_exception` derives from `std::exception`).
.Example 2:
[source,c++]
----
enum class my_error { e1=1, e2, e3 }; <1>
leaf::throw_exception(my_error::e1);
----
<1> Throws an exception of a type that derives from `error_id` and from `std::exception` (because `my_error` does not derive from `std::exception`).
NOTE: To automatically capture `pass:[__FILE__]`, `pass:[__LINE__]` and `pass:[__FUNCTION__]` with the returned object, use <<BOOST_LEAF_THROW_EXCEPTION>> instead of `leaf::throw_exception`.
'''
[[to_variant]]
=== `to_variant`
.#include <boost/leaf/to_variant.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... E, class TryBlock>
std::variant<
typename std::decay<decltype(std::declval<TryBlock>()().value())>::type
std::tuple<
std::optional<E>...>>
to_variant( TryBlock && try_block );
} }
----
Requires: ::
* This function is only available under {CPP}-17 or newer.
* The `try_block` function may not take any arguments.
* The type returned by the `try_block` function must be a `result<T>` type (see <<is_result_type>>). It is valid for the `try_block` to return `leaf::<<result,result>><T>`, however this is not a requirement.
The `to_variant` function uses <<try_handle_all>> internally to invoke the `try_block` and capture the result in a `std::variant`. On success, the variant contains the `T` object from the produced `result<T>`. Otherwise, the variant contains a `std::tuple` where each `std::optional` element contains an object of type `E~i~` from the user-supplied sequence `E...`, or is empty if the failure did not produce an error object of that type.
.Example:
[source,c++]
----
enum class E1 { e11, e12, e13 };
enum class E2 { e21, e22, e23 };
enum class E3 { e31, e32, e33 };
....
auto v = leaf::to_variant<E1, E2, E3>(
[]() -> leaf::result<int>
{
return leaf::new_error( E1::e12, E3::e33 );
} );
assert(v.index() == 1); <1>
auto t = std::get<1>(v); <2>
assert(std::get<0>(t).value() == E1::e12); <3>
assert(!std::get<1>(t).has_value()); <4>
assert(std::get<2>(t).value() == E3::e33); <3>
----
<1> We report a failure, so the variant must contain the error object tuple, rather than an `int`.
<2> Grab the error tuple.
<3> We communicated an `E1` and an `E3` error object...
<4> ...but not an `E2` error object.
'''
[[try_catch]]
=== `try_catch`
.#include <boost/leaf/handle_errors.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()())>::type
try_catch( TryBlock && try_block, H && ... h );
} }
----
The `try_catch` function works similarly to <<try_handle_some>>, except that it does not use or understand the semantics of `result<T>` types; instead:
* It assumes that the `try_block` throws to indicate a failure, in which case `try_catch` will attempt to find a suitable handler among `h...`;
* If a suitable handler isn't found, the original exception is re-thrown using `throw;`.
TIP: See <<tutorial-exception_handling>>.
'''
[[try_handle_all]]
=== `try_handle_all`
.#include <boost/leaf/handle_errors.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()().value())>::type
try_handle_all( TryBlock && try_block, H && ... h );
} }
----
The `try_handle_all` function works similarly to <<try_handle_some>>, except:
* In addition, it requires that at least one of `h...` can be used to handle any error (this requirement is enforced at compile time);
* If the `try_block` returns some `result<T>` type, it must be possible to initialize a value of type `T` with the value returned by each of `h...`, and
* Because it is required to handle all errors, `try_handle_all` unwraps the `result<T>` object `r` returned by the `try_block`, returning `r.value()` instead of `r`.
TIP: See <<tutorial-error_handling>>.
'''
[[try_handle_some]]
=== `try_handle_some`
.#include <boost/leaf/handle_errors.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class TryBlock, class... H>
typename std::decay<decltype(std::declval<TryBlock>()())>::type
try_handle_some( TryBlock && try_block, H && ... h );
} }
----
Requires: ::
* The `try_block` function may not take any arguments.
* The type `R` returned by the `try_block` function must be a `result<T>` type (see <<is_result_type>>). It is valid for the `try_block` to return `leaf::<<result,result>><T>`, however this is not a requirement.
* Each of the `h...` functions:
** must return a type that can be used to initialize an object of the type `R`; in case R is a `result<void>` (that is, in case of success it does not communicate a value), handlers that return `void` are permitted. If such a handler is selected, the `try_handle_some` return value is initialized by `{}`;
** may take any error objects, by value, by (`const`) reference, or as pointer (to `const`);
** may take arguments, by value, of any predicate type: <<catch_>>, <<match>>, <<match_value>>, <<match_member>>, <<if_not>>, or of any user-defined predicate type `Pred` for which `<<is_predicate,is_predicate>><Pred>::value` is `true`;
** may take an <<error_info>> argument by `const &`;
** may take a <<diagnostic_info>> argument by `const &`;
** may take a <<verbose_diagnostic_info>> argument by `const &`.
Effects: ::
* Creates a local `<<context,context>><E...>` object `ctx`, where the `E...` types are automatically deduced from the types of arguments taken by each of `h...`, which guarantees that `ctx` is able to store all of the types required to handle errors.
* Invokes the `try_block`:
** if the returned object `r` indicates success [.underline]#and# the `try_block` did not throw, `r` is forwarded to the caller.
** otherwise, LEAF considers each of the `h...` handlers, in order, until it finds one that it can supply with arguments using the error objects currently stored in `ctx`, associated with `r.error()`. The first such handler is invoked and its return value is used to initialize the return value of `try_handle_some`, which can indicate success if the handler was able to handle the error, or failure if it was not.
+
** if `try_handle_some` is unable to find a suitable handler, it returns `r`.
NOTE: `try_handle_some` is exception-neutral: it does not throw exceptions, however the `try_block` and any of `h...` are permitted to throw.
[[handler_selection_procedure]]
Handler Selection Procedure: ::
+
A handler `h` is suitable to handle the failure reported by `r` iff `try_handle_some` is able to produce values to pass as its arguments, using the error objects currently available in `ctx`, associated with the error ID obtained by calling `r.error()`. As soon as it is determined that an argument value can not be produced, the current handler is dropped and the selection process continues with the next handler, if any.
+
The return value of `r.error()` must be implicitly convertible to <<error_id>>. Naturally, the `leaf::result` template satisfies this requirement. If an external `result` type is used instead, usually `r.error()` would return a `std::error_code`, which is able to communicate LEAF error IDs; see <<tutorial-interoperability>>.
+
If `err` is the `error_id` obtained from `r.error()`, each argument `a~i~` taken by the handler currently under consideration is produced as follows:
+
* If `a~i~` is of type `A~i~`, `A~i~ const&` or `A~i~&`:
+
--
** If an error object of type `A~i~`, associated with `err`, is currently available in `ctx`, `a~i~` is initialized with a reference to that object; otherwise
** If `A~i~` derives from `std::exception`, and the `try_block` throws an object `ex` of type that derives from `std::exception`, LEAF obtains `A~i~* p = dynamic_cast<A~i~*>(&ex)`. The handler is dropped if `p` is null, otherwise `a~i~` is initialized with `*p`.
** Otherwise the handler is dropped.
--
+
.Example:
[source,c++]
----
....
auto r = leaf::try_handle_some(
[]() -> leaf::result<int>
{
return f();
},
[](leaf::e_file_name const & fn) <1>
{
std::cerr << "File Name: \"" << fn.value << '"' << std::endl; <2>
return 1;
} );
----
+
[.text-right]
<<result>> | <<e_file_name>>
+
<1> In case the `try_block` indicates a failure, this handler will be selected if `ctx` stores an `e_file_name` associated with the error. Because this is the only supplied handler, if an `e_file_name` is not available, `try_handle_some` will return the `leaf::result<int>` returned by `f`.
<2> Print the file name, handle the error.
+
* If `a~i~` is of type `A~i~` `const*` or `A~i~*`, `try_handle_some` is always able to produce it: first it attempts to produce it as if it is taken by reference; if that fails, rather than dropping the handler, `a~i~` is initialized with `0`.
+
.Example:
[source,c++]
----
....
try_handle_some(
[]() -> leaf::result<int>
{
return f();
},
[](leaf::e_file_name const * fn) <1>
{
if( fn ) <2>
std::cerr << "File Name: \"" << fn->value << '"' << std::endl;
return 1;
} );
}
----
+
[.text-right]
<<result>> | <<e_file_name>>
+
<1> This handler can be selected to handle any error, because it takes `e_file_name` as a `const *` (and nothing else).
<2> If an `e_file_name` is available with the current error, print it.
+
* If `a~i~` is of a predicate type `Pred` (for which `<<is_predicate,is_predicate>><Pred>::value` is `true`), `E` is deduced as `typename Pred::error_type`, and then:
** If `E` is not `void`, and an error object `e` of type `E`, associated with `err`, is not currently stored in `ctx`, the handler is dropped; otherwise the handler is dropped if the expression `Pred::evaluate(e)` returns `false`.
** if `E` is `void`, and a `std::exception` was not caught, the handler is dropped; otherwise the handler is dropped if the expression `Pred::evaluate(e)`, where `e` is of type `std::exception const &`, returns `false`.
** To invoke the handler, the `Pred` argument `a~i~` is initialized with `Pred{e}`.
+
NOTE: See also: <<predicates,Predicates>>.
+
* If `a~i~` is of type `error_info const &`, `try_handle_some` is always able to produce it.
+
.Example:
[source,c++]
----
....
try_handle_some(
[]
{
return f(); // returns leaf::result<T>
},
[](leaf::error_info const & info) <1>
{
std::cerr << "leaf::error_info:" << std::endl << info; <2>
return info.error(); <3>
} );
----
+
[.text-right]
<<result>> | <<error_info>>
+
<1> This handler matches any error.
<2> Print error information.
<3> Return the original error, which will be returned out of `try_handle_some`.
+
* If `a~i~` is of type `diagnostic_info const &`, `try_handle_some` is always able to produce it.
+
.Example:
[source,c++]
----
....
try_handle_some(
[]
{
return f(); // throws
},
[](leaf::diagnostic_info const & info) <1>
{
std::cerr << "leaf::diagnostic_information:" << std::endl << info; <2>
return info.error(); <3>
} );
----
+
[.text-right]
<<result>> | <<diagnostic_info>>
+
<1> This handler matches any error.
<2> Print diagnostic information, including limited information about dropped error objects.
<3> Return the original error, which will be returned out of `try_handle_some`.
+
* If `a~i~` is of type `verbose_diagnostic_info const &`, `try_handle_some` is always able to produce it.
+
.Example:
[source,c++]
----
....
try_handle_some(
[]
{
return f(); // throws
},
[](leaf::verbose_diagnostic_info const & info) <1>
{
std::cerr << "leaf::verbose_diagnostic_information:" << std::endl << info; <2>
return info.error(); <3>
} );
----
+
[.text-right]
<<result>> | <<verbose_diagnostic_info>>
+
<1> This handler matches any error.
<2> Print verbose diagnostic information, including values of dropped error objects.
<3> Return the original error, which will be returned out of `try_handle_some`.
[[types]]
== Reference: Types
TIP: The contents of each Reference section are organized alphabetically.
'''
[[context]]
=== `context`
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... E>
class context
{
context( context const & ) = delete;
context & operator=( context const & ) = delete;
public:
context() noexcept;
context( context && x ) noexcept;
~context() noexcept;
void activate() noexcept;
void deactivate() noexcept;
bool is_active() const noexcept;
void propagate( error_id ) noexcept;
void print( std::ostream & os ) const;
template <class R, class... H>
R handle_error( error_id, H && ... ) const;
};
template <class... H>
using context_type_from_handlers = typename <<unspecified>>::type;
} }
----
[.text-right]
<<context::context>> | <<context::activate>> | <<context::deactivate>> | <<context::is_active>> | <<context::propagate>> | <<context::print>> | <<context::handle_error>> | <<context_type_from_handlers>>
The `context` class template provides storage for each of the specified `E...` types. Typically, `context` objects are not used directly; they're created internally when the <<try_handle_some>>, <<try_handle_all>> or <<try_catch>> functions are invoked, instantiated with types that are automatically deduced from the types of the arguments of the passed handlers.
Independently, users can create `context` objects if they need to capture error objects and then transport them, by moving the `context` object itself.
Even in that case it is recommended that users do not instantiate the `context` template by explicitly listing the `E...` types they want it to be able to store. Instead, use <<context_type_from_handlers>> or call the <<make_context>> function template, which deduce the correct `E...` types from a captured list of handler function objects.
To be able to load up error objects in a `context` object, it must be activated. Activating a `context` object `ctx` binds it to the calling thread, setting thread-local pointers of the stored `E...` types to point to the corresponding storage within `ctx`. It is possible, even likely, to have more than one active `context` in any given thread. In this case, activation/deactivation must happen in a LIFO manner. For this reason, it is best to use a <<context_activator>>, which relies on RAII to activate and deactivate a `context`.
When a `context` is deactivated, it detaches from the calling thread, restoring the thread-local pointers to their pre-`activate` values. Typically, at this point the stored error objects, if any, are either discarded (by default) or moved to corresponding storage in other `context` objects active in the calling thread (if available), by calling <<context::propagate>>.
While error handling typically uses <<try_handle_some>>, <<try_handle_all>> or <<try_catch>>, it is also possible to handle errors by calling the member function <<context::handle_error>>. It takes an <<error_id>>, and attempts to select an error handler based on the error objects stored in `*this`, associated with the passed `error_id`.
TIP: `context` objects can be moved, as long as they aren't active.
WARNING: Moving an active `context` results in undefined behavior.
'''
[[context::context]]
==== Constructors
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... E>
context<E...>::context() noexcept;
template <class... E>
context<E...>::context( context && x ) noexcept;
} }
----
The default constructor initializes an empty `context` object: it provides storage for, but does not contain any error objects.
The move constructor moves the stored error objects from one `context` to the other.
WARNING: Moving an active `context` object results in undefined behavior.
'''
[[context::activate]]
==== `activate`
.#include <boost/leaf/context.hpp>
[source,c++]
----
namespace boost { namespace leaf {
template <class... E>
void context<E...>::activate() noexcept;
} }
----
Requires: :: `!<<context::is_active,is_active>>()`.
Effects: :: Associates `*this` with the calling thread.
Ensures: :: `<<context::is_active,is_active>>()`.
When a context is associated with a thread, thread-local pointers are set to point each `E...` type in its store, while the previous value of each such pointer is preserved in the `context` object, so that the effect of `activate` can be undone by calling `deactivate`.
When an error object is <<tutorial-loading,loaded>>, it is moved in the last activated (in the calling thread) `context` object that provides storage for its type (note that this may or may not be the last activated `context` object). If no such storage is available, the error object is discarded.
'''
[[context::deactivate]]
==== `deactivate`
.#include <boost/leaf/context.hpp>
gitextract_sux2q_ly/ ├── .drone/ │ └── drone.sh ├── .drone.star ├── .gitattributes ├── .github/ │ └── workflows/ │ ├── ci.yml │ └── gh-pages.yml ├── .gitignore ├── .travis.yml ├── .vscode/ │ ├── launch.json │ └── tasks.json ├── CMakeLists.txt ├── LICENSE_1_0.txt ├── README.md ├── appveyor.yml ├── benchmark/ │ ├── b.bat │ ├── b.sh │ ├── benchmark.md │ ├── deep_stack_leaf.cpp │ └── deep_stack_other.cpp ├── conanfile.py ├── doc/ │ ├── Jamfile │ ├── docinfo.html │ ├── leaf-theme.yml │ ├── leaf.adoc │ ├── rouge-github.css │ ├── whitepaper.md │ ├── zajo-dark.css │ └── zajo-light.css ├── example/ │ ├── asio_beast_leaf_rpc.cpp │ ├── capture_in_exception.cpp │ ├── capture_in_result.cpp │ ├── error_log.cpp │ ├── error_trace.cpp │ ├── exception_to_result.cpp │ ├── lua_callback_eh.cpp │ ├── lua_callback_result.cpp │ ├── print_file/ │ │ ├── print_file_eh.cpp │ │ ├── print_file_outcome_result.cpp │ │ ├── print_file_result.cpp │ │ └── readme.md │ ├── print_half.cpp │ └── readme.md ├── gen/ │ └── generate_single_header.py ├── include/ │ └── boost/ │ ├── leaf/ │ │ ├── capture.hpp │ │ ├── common.hpp │ │ ├── config/ │ │ │ ├── tls.hpp │ │ │ ├── tls_array.hpp │ │ │ ├── tls_cpp11.hpp │ │ │ ├── tls_freertos.hpp │ │ │ └── tls_globals.hpp │ │ ├── config.hpp │ │ ├── context.hpp │ │ ├── detail/ │ │ │ ├── all.hpp │ │ │ ├── demangle.hpp │ │ │ ├── function_traits.hpp │ │ │ ├── mp11.hpp │ │ │ ├── optional.hpp │ │ │ └── print.hpp │ │ ├── error.hpp │ │ ├── exception.hpp │ │ ├── handle_errors.hpp │ │ ├── on_error.hpp │ │ ├── pred.hpp │ │ ├── result.hpp │ │ └── to_variant.hpp │ └── leaf.hpp ├── index.html ├── meson.build ├── meson_options.txt ├── meta/ │ └── libraries.json ├── subprojects/ │ ├── lua.wrap │ └── tl_expected.wrap ├── test/ │ ├── BOOST_LEAF_ASSIGN_test.cpp │ ├── BOOST_LEAF_AUTO_test.cpp │ ├── BOOST_LEAF_CHECK_test.cpp │ ├── Jamfile.v2 │ ├── _compile-fail-BOOST_LEAF_ASSIGN.cpp │ ├── _compile-fail-BOOST_LEAF_AUTO.cpp │ ├── _compile-fail-arg_boost_error_info_1.cpp │ ├── _compile-fail-arg_boost_error_info_2.cpp │ ├── _compile-fail-arg_catch_1.cpp │ ├── _compile-fail-arg_catch_2.cpp │ ├── _compile-fail-arg_match_1.cpp │ ├── _compile-fail-arg_match_2.cpp │ ├── _compile-fail-arg_rvalue_ref.cpp │ ├── _compile-fail-diagnostic_info.cpp │ ├── _compile-fail-error_info.cpp │ ├── _compile-fail-exception_1.cpp │ ├── _compile-fail-exception_2.cpp │ ├── _compile-fail-new_error.cpp │ ├── _compile-fail-result_1.cpp │ ├── _compile-fail-result_2.cpp │ ├── _compile-fail-result_3.cpp │ ├── _compile-fail-result_4.cpp │ ├── _compile-fail-verbose_diagnostic_info.cpp │ ├── _hpp_capture_test.cpp │ ├── _hpp_common_test.cpp │ ├── _hpp_config_test.cpp │ ├── _hpp_context_test.cpp │ ├── _hpp_error_test.cpp │ ├── _hpp_exception_test.cpp │ ├── _hpp_handle_errors_test.cpp │ ├── _hpp_leaf_test.cpp │ ├── _hpp_on_error_test.cpp │ ├── _hpp_pred_test.cpp │ ├── _hpp_result_test.cpp │ ├── _hpp_to_variant_test.cpp │ ├── _test_ec.hpp │ ├── _test_res.hpp │ ├── accumulate_basic_test.cpp │ ├── accumulate_nested_error_exception_test.cpp │ ├── accumulate_nested_error_result_test.cpp │ ├── accumulate_nested_new_error_exception_test.cpp │ ├── accumulate_nested_new_error_result_test.cpp │ ├── accumulate_nested_success_exception_test.cpp │ ├── accumulate_nested_success_result_test.cpp │ ├── boost/ │ │ └── core/ │ │ ├── current_function.hpp │ │ └── lightweight_test.hpp │ ├── boost_exception_test.cpp │ ├── capture_exception_async_test.cpp │ ├── capture_exception_result_async_test.cpp │ ├── capture_exception_state_test.cpp │ ├── capture_exception_unload_test.cpp │ ├── capture_result_async_test.cpp │ ├── capture_result_state_test.cpp │ ├── capture_result_unload_test.cpp │ ├── context_activator_test.cpp │ ├── context_deduction_test.cpp │ ├── ctx_handle_all_test.cpp │ ├── ctx_handle_some_test.cpp │ ├── ctx_remote_handle_all_test.cpp │ ├── ctx_remote_handle_some_test.cpp │ ├── defer_basic_test.cpp │ ├── defer_nested_error_exception_test.cpp │ ├── defer_nested_error_result_test.cpp │ ├── defer_nested_new_error_exception_test.cpp │ ├── defer_nested_new_error_result_test.cpp │ ├── defer_nested_success_exception_test.cpp │ ├── defer_nested_success_result_test.cpp │ ├── diagnostic_info_test.cpp │ ├── diagnostic_info_test2.cpp │ ├── e_LastError_test.cpp │ ├── e_errno_test.cpp │ ├── error_code_test.cpp │ ├── error_id_test.cpp │ ├── exception_test.cpp │ ├── exception_to_result_test.cpp │ ├── function_traits_test.cpp │ ├── handle_all_other_result_test.cpp │ ├── handle_all_test.cpp │ ├── handle_basic_test.cpp │ ├── handle_some_other_result_test.cpp │ ├── handle_some_test.cpp │ ├── lightweight_test.hpp │ ├── match_member_test.cpp │ ├── match_test.cpp │ ├── match_value_test.cpp │ ├── multiple_errors_test.cpp │ ├── optional_test.cpp │ ├── preload_basic_test.cpp │ ├── preload_exception_test.cpp │ ├── preload_nested_error_exception_test.cpp │ ├── preload_nested_error_result_test.cpp │ ├── preload_nested_new_error_exception_test.cpp │ ├── preload_nested_new_error_result_test.cpp │ ├── preload_nested_success_exception_test.cpp │ ├── preload_nested_success_result_test.cpp │ ├── print_test.cpp │ ├── result_bad_result_test.cpp │ ├── result_implicit_conversion_test.cpp │ ├── result_load_test.cpp │ ├── result_ref_test.cpp │ ├── result_state_test.cpp │ ├── tls_array_alloc_test1.cpp │ ├── tls_array_alloc_test2.cpp │ ├── tls_array_alloc_test3.cpp │ ├── tls_array_test.cpp │ ├── to_variant_test.cpp │ ├── try_catch_error_id_test.cpp │ ├── try_catch_system_error_test.cpp │ ├── try_catch_test.cpp │ ├── try_exception_and_result_test.cpp │ ├── visibility_test.cpp │ ├── visibility_test_lib.cpp │ └── visibility_test_lib.hpp └── wasm.txt
Showing preview only (250K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (1313 symbols across 141 files)
FILE: benchmark/deep_stack_leaf.cpp
type boost (line 38) | namespace boost
function throw_exception (line 40) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 46) | struct source_location
function throw_exception (line 47) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
type e_error_code (line 61) | enum class e_error_code
type e_system_error (line 66) | struct e_system_error
type e_heavy_payload (line 72) | struct e_heavy_payload
function should_fail (line 112) | inline bool should_fail( int failure_rate ) noexcept
function handle_error (line 119) | inline int handle_error( e_error_code e ) noexcept
function handle_error (line 124) | inline int handle_error( std::error_code const & e ) noexcept
function handle_error (line 129) | inline int handle_error( e_system_error const & e ) noexcept
function handle_error (line 134) | inline int handle_error( e_heavy_payload const & e ) noexcept
type select_result_type (line 144) | struct select_result_type
type select_result_type<N, E, true> (line 147) | struct select_result_type<N, E, true>
type select_result_type<N, E, false> (line 153) | struct select_result_type<N, E, false>
type benchmark (line 164) | struct benchmark
method f (line 168) | f( int failure_rate ) noexcept
type benchmark<1, E> (line 176) | struct benchmark<1, E>
method f (line 180) | f( int failure_rate ) noexcept
function NOINLINE (line 192) | NOINLINE int runner( int failure_rate ) noexcept
function append_csv (line 211) | std::fstream append_csv()
function print_elapsed_time (line 227) | int print_elapsed_time( int iteration_count, F && f )
function benchmark_type (line 243) | int benchmark_type( char const * type_name, int iteration_count )
function main (line 259) | int main()
FILE: benchmark/deep_stack_other.cpp
type boost (line 58) | namespace boost
function throw_exception (line 60) | void throw_exception( std::exception const & e )
type source_location (line 66) | struct source_location
function throw_exception (line 67) | void throw_exception( std::exception const & e, boost::source_location...
type e_error_code (line 102) | enum class e_error_code
type e_system_error (line 107) | struct e_system_error
type e_heavy_payload (line 113) | struct e_heavy_payload
function e_error_code (line 122) | inline e_error_code make_error<e_error_code>() noexcept
function e_system_error (line 140) | inline e_system_error make_error<e_system_error>() noexcept
function e_heavy_payload (line 146) | inline e_heavy_payload make_error<e_heavy_payload>() noexcept
function should_fail (line 153) | inline bool should_fail( int failure_rate ) noexcept
function handle_error (line 160) | inline int handle_error( e_error_code e ) noexcept
function handle_error (line 165) | inline int handle_error( std::error_code const & e ) noexcept
function handle_error (line 170) | inline int handle_error( e_system_error const & e ) noexcept
function handle_error (line 175) | inline int handle_error( e_heavy_payload const & e ) noexcept
type select_result_type (line 185) | struct select_result_type
type select_result_type<N, E, true> (line 188) | struct select_result_type<N, E, true>
type select_result_type<N, E, false> (line 194) | struct select_result_type<N, E, false>
type benchmark (line 205) | struct benchmark
method f (line 209) | f( int failure_rate ) noexcept
type benchmark<1, E> (line 217) | struct benchmark<1, E>
method f (line 221) | f( int failure_rate ) noexcept
function NOINLINE (line 233) | NOINLINE int runner( int failure_rate ) noexcept
function append_csv (line 243) | std::fstream append_csv()
function print_elapsed_time (line 259) | int print_elapsed_time( int iteration_count, F && f )
function benchmark_type (line 275) | int benchmark_type( char const * type_name, int iteration_count )
function main (line 291) | int main()
FILE: conanfile.py
class BoostLEAFConan (line 12) | class BoostLEAFConan(ConanFile):
method package_id (line 25) | def package_id(self):
method _min_cppstd (line 29) | def _min_cppstd(self):
method _compilers_minimum_version (line 33) | def _compilers_minimum_version(self):
method requirements (line 42) | def requirements(self):
method validate (line 45) | def validate(self):
method layout (line 63) | def layout(self):
method package (line 66) | def package(self):
method package_info (line 74) | def package_info(self):
FILE: example/asio_beast_leaf_rpc.cpp
type e_last_operation (line 55) | struct e_last_operation {
function async_demo_rpc (line 91) | auto async_demo_rpc(AsyncStream &stream, ErrorContext &error_context, Co...
type e_parse_int64_error (line 192) | struct e_parse_int64_error {
type location (line 194) | struct location : public location_base {
function parse_int64 (line 215) | leaf::result<std::int64_t> parse_int64(std::string_view word) {
type e_command (line 229) | struct e_command {
type e_unexpected_arg_count (line 236) | struct e_unexpected_arg_count {
type arg_info (line 237) | struct arg_info {
type e_http_status (line 260) | struct e_http_status {
type e_unexpected_http_method (line 265) | struct e_unexpected_http_method {
type e_error_quit (line 270) | struct e_error_quit {
type none_t (line 271) | struct none_t {}
function execute_command (line 276) | leaf::result<std::string> execute_command(std::string_view line) {
function diagnostic_to_str (line 389) | std::string diagnostic_to_str(leaf::verbose_diagnostic_info const &diag) {
function response_t (line 396) | response_t handle_request(request_t &&request) {
function main (line 468) | int main(int argc, char **argv) {
FILE: example/capture_in_exception.cpp
type e_thread_id (line 22) | struct e_thread_id { std::thread::id value; }
type e_failure_info1 (line 23) | struct e_failure_info1 { std::string value; }
type e_failure_info2 (line 24) | struct e_failure_info2 { int value; }
type task_result (line 27) | struct task_result { }
function task_result (line 31) | task_result task()
function main (line 43) | int main()
FILE: example/capture_in_result.cpp
type e_thread_id (line 22) | struct e_thread_id { std::thread::id value; }
type e_failure_info1 (line 23) | struct e_failure_info1 { std::string value; }
type e_failure_info2 (line 24) | struct e_failure_info2 { int value; }
type task_result (line 27) | struct task_result { }
function task (line 31) | leaf::result<task_result> task()
function main (line 43) | int main()
type boost (line 105) | namespace boost
function throw_exception (line 107) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 113) | struct source_location
function throw_exception (line 114) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/error_log.cpp
type e_error_log (line 25) | struct e_error_log
type rec (line 27) | struct rec
method e_error_log (line 37) | e_error_log()
function f1 (line 62) | leaf::result<void> f1()
function f2 (line 71) | leaf::result<void> f2()
function f3 (line 80) | leaf::result<void> f3()
function f4 (line 89) | leaf::result<void> f4()
function f5 (line 98) | leaf::result<void> f5()
function main (line 107) | int main()
type boost (line 134) | namespace boost
function throw_exception (line 136) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 142) | struct source_location
function throw_exception (line 143) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/error_trace.cpp
type e_error_trace (line 27) | struct e_error_trace
type rec (line 29) | struct rec
function f1 (line 61) | leaf::result<void> f1()
function f2 (line 70) | leaf::result<void> f2()
function f3 (line 79) | leaf::result<void> f3()
function f4 (line 88) | leaf::result<void> f4()
function f5 (line 97) | leaf::result<void> f5()
function main (line 106) | int main()
type boost (line 134) | namespace boost
function throw_exception (line 136) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 142) | struct source_location
function throw_exception (line 143) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/exception_to_result.cpp
class error_base (line 15) | class error_base: public virtual std::exception { }
class error_a (line 16) | class error_a: public virtual error_base { }
class error_b (line 17) | class error_b: public virtual error_base { }
class error_c (line 18) | class error_c: public virtual error_base { }
function compute_answer_throws (line 22) | int compute_answer_throws()
function compute_answer (line 35) | leaf::result<int> compute_answer() noexcept
function print_answer (line 49) | leaf::result<void> print_answer() noexcept
function main (line 57) | int main()
FILE: example/lua_callback_eh.cpp
type do_work_error_code (line 19) | enum do_work_error_code
type e_lua_pcall_error (line 25) | struct e_lua_pcall_error
type e_lua_error_message (line 42) | struct e_lua_error_message { std::string value; }
type e_lua_exception (line 44) | struct e_lua_exception { std::exception_ptr value; }
function wrap_lua_CFunction (line 49) | int wrap_lua_CFunction( lua_State * L ) noexcept
function do_work (line 68) | int do_work( lua_State * L )
function init_lua_state (line 83) | std::shared_ptr<lua_State> init_lua_state()
function call_lua (line 111) | int call_lua( lua_State * L )
function main (line 148) | int main()
FILE: example/lua_callback_result.cpp
type do_work_error_code (line 19) | enum do_work_error_code
type e_lua_pcall_error (line 25) | struct e_lua_pcall_error
type e_lua_error_message (line 42) | struct e_lua_error_message { std::string value; }
function do_work (line 50) | int do_work( lua_State * L )
function init_lua_state (line 65) | std::shared_ptr<lua_State> init_lua_state()
function call_lua (line 93) | leaf::result<int> call_lua( lua_State * L )
function main (line 120) | int main()
type boost (line 159) | namespace boost
function throw_exception (line 161) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 167) | struct source_location
function throw_exception (line 168) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/print_file/print_file_eh.cpp
type error_code (line 21) | enum error_code
function main (line 50) | int main( int argc, char const * argv[] )
function file_open (line 160) | std::shared_ptr<FILE> file_open( char const * file_name )
function file_size (line 170) | std::size_t file_size( FILE & f )
function file_read (line 189) | void file_read( FILE & f, void * buf, std::size_t size )
FILE: example/print_file/print_file_outcome_result.cpp
type error_code (line 23) | enum error_code
type boost (line 39) | namespace boost { namespace leaf {
type leaf (line 39) | namespace leaf {
type is_result_type<outcome::std_result<T>> (line 40) | struct is_result_type<outcome::std_result<T>>: std::true_type { }
function throw_exception (line 220) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 226) | struct source_location
function throw_exception (line 227) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
function main (line 62) | int main( int argc, char const * argv[] )
function parse_command_line (line 162) | result<char const *> parse_command_line( int argc, char const * argv[] )
function file_open (line 172) | result<std::shared_ptr<FILE>> file_open( char const * file_name )
function file_size (line 182) | result<std::size_t> file_size( FILE & f )
function file_read (line 201) | result<void> file_read( FILE & f, void * buf, std::size_t size )
type boost (line 218) | namespace boost
type leaf (line 39) | namespace leaf {
type is_result_type<outcome::std_result<T>> (line 40) | struct is_result_type<outcome::std_result<T>>: std::true_type { }
function throw_exception (line 220) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 226) | struct source_location
function throw_exception (line 227) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/print_file/print_file_result.cpp
type error_code (line 21) | enum error_code
function main (line 54) | int main( int argc, char const * argv[] )
function parse_command_line (line 154) | result<char const *> parse_command_line( int argc, char const * argv[] )
function file_open (line 164) | result<std::shared_ptr<FILE>> file_open( char const * file_name )
function file_size (line 174) | result<std::size_t> file_size( FILE & f )
function file_read (line 193) | result<void> file_read( FILE & f, void * buf, std::size_t size )
type boost (line 210) | namespace boost
function throw_exception (line 212) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 218) | struct source_location
function throw_exception (line 219) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: example/print_half.cpp
type ConversionErrc (line 17) | enum class ConversionErrc
function convert (line 24) | leaf::result<int> convert(const std::string& str) noexcept
type BigInt (line 39) | struct BigInt
method fromString (line 41) | static leaf::result<BigInt> fromString(const std::string& s) { return ...
method BigInt (line 42) | explicit BigInt(const std::string&) { }
method BigInt (line 43) | BigInt half() const { return BigInt{""}; }
function print_half (line 49) | leaf::result<void> print_half(const std::string& text)
function main (line 66) | int main( int argc, char const * argv[] )
type boost (line 105) | namespace boost
function throw_exception (line 107) | [[noreturn]] void throw_exception( std::exception const & e )
type source_location (line 113) | struct source_location
function throw_exception (line 114) | [[noreturn]] void throw_exception( std::exception const & e, boost::so...
FILE: gen/generate_single_header.py
function append (line 28) | def append(input_file_name, input_file, output_file, regex_includes, inc...
function _main (line 53) | def _main():
FILE: include/boost/leaf/capture.hpp
type boost (line 15) | namespace boost { namespace leaf {
type leaf (line 15) | namespace leaf {
type leaf_detail (line 17) | namespace leaf_detail
type is_result_tag (line 20) | struct is_result_tag
type is_result_tag<R, false> (line 23) | struct is_result_tag<R, false>
type is_result_tag<R, true> (line 28) | struct is_result_tag<R, true>
function capture_impl (line 38) | inline
function capture_impl (line 47) | inline
function future_get_impl (line 62) | inline
function future_get_impl (line 70) | inline
class capturing_exception (line 85) | class capturing_exception:
method capturing_exception (line 93) | capturing_exception(std::exception_ptr && ex, context_ptr && ctx...
method unload_and_rethrow_original_exception (line 102) | [[noreturn]] void unload_and_rethrow_original_exception() const
method print (line 111) | void print( std::basic_ostream<CharT, Traits> & os ) const
function capture_impl (line 118) | inline
function capture_impl (line 145) | inline
function future_get_impl (line 178) | inline
function future_get_impl (line 193) | inline
type leaf_detail (line 35) | namespace leaf_detail
type is_result_tag (line 20) | struct is_result_tag
type is_result_tag<R, false> (line 23) | struct is_result_tag<R, false>
type is_result_tag<R, true> (line 28) | struct is_result_tag<R, true>
function capture_impl (line 38) | inline
function capture_impl (line 47) | inline
function future_get_impl (line 62) | inline
function future_get_impl (line 70) | inline
class capturing_exception (line 85) | class capturing_exception:
method capturing_exception (line 93) | capturing_exception(std::exception_ptr && ex, context_ptr && ctx...
method unload_and_rethrow_original_exception (line 102) | [[noreturn]] void unload_and_rethrow_original_exception() const
method print (line 111) | void print( std::basic_ostream<CharT, Traits> & os ) const
function capture_impl (line 118) | inline
function capture_impl (line 145) | inline
function future_get_impl (line 178) | inline
function future_get_impl (line 193) | inline
type leaf_detail (line 83) | namespace leaf_detail
type is_result_tag (line 20) | struct is_result_tag
type is_result_tag<R, false> (line 23) | struct is_result_tag<R, false>
type is_result_tag<R, true> (line 28) | struct is_result_tag<R, true>
function capture_impl (line 38) | inline
function capture_impl (line 47) | inline
function future_get_impl (line 62) | inline
function future_get_impl (line 70) | inline
class capturing_exception (line 85) | class capturing_exception:
method capturing_exception (line 93) | capturing_exception(std::exception_ptr && ex, context_ptr && ctx...
method unload_and_rethrow_original_exception (line 102) | [[noreturn]] void unload_and_rethrow_original_exception() const
method print (line 111) | void print( std::basic_ostream<CharT, Traits> & os ) const
function capture_impl (line 118) | inline
function capture_impl (line 145) | inline
function future_get_impl (line 178) | inline
function future_get_impl (line 193) | inline
function capture (line 214) | inline
function future_get (line 223) | inline
FILE: include/boost/leaf/common.hpp
type boost (line 28) | namespace boost { namespace leaf {
type leaf (line 28) | namespace leaf {
function e_api_function (line 30) | struct BOOST_LEAF_SYMBOL_VISIBLE e_api_function { char const * value; }
function e_file_name (line 34) | struct BOOST_LEAF_SYMBOL_VISIBLE e_file_name
function e_file_name (line 41) | struct BOOST_LEAF_SYMBOL_VISIBLE e_file_name
function e_errno (line 49) | struct BOOST_LEAF_SYMBOL_VISIBLE e_errno
function e_type_info_name (line 62) | struct BOOST_LEAF_SYMBOL_VISIBLE e_type_info_name { char const * val...
function e_at_line (line 64) | struct BOOST_LEAF_SYMBOL_VISIBLE e_at_line { int value; }
type windows (line 66) | namespace windows
type e_LastError (line 68) | struct e_LastError
method e_LastError (line 72) | explicit e_LastError(unsigned val): value(val) { }
method e_LastError (line 75) | e_LastError(): value(GetLastError()) { }
type msg_buf (line 80) | struct msg_buf
method msg_buf (line 83) | msg_buf(): p(nullptr) { }
FILE: include/boost/leaf/config/tls_array.hpp
type boost (line 15) | namespace boost { namespace leaf {
type leaf (line 15) | namespace leaf {
type tls (line 17) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
type leaf_detail (line 56) | namespace leaf_detail
type tls (line 61) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
function tls_index (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE tls_index
function alloc_tls_index (line 86) | struct BOOST_LEAF_SYMBOL_VISIBLE alloc_tls_index
function T (line 103) | T * read_ptr() noexcept
function write_ptr (line 113) | void write_ptr( T * p ) noexcept
function read_uint (line 124) | unsigned read_uint() noexcept
function write_uint (line 131) | void write_uint( unsigned x ) noexcept
function uint_increment (line 138) | void uint_increment() noexcept
function uint_decrement (line 144) | void uint_decrement() noexcept
type leaf (line 54) | namespace leaf {
type tls (line 17) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
type leaf_detail (line 56) | namespace leaf_detail
type tls (line 61) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
function tls_index (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE tls_index
function alloc_tls_index (line 86) | struct BOOST_LEAF_SYMBOL_VISIBLE alloc_tls_index
function T (line 103) | T * read_ptr() noexcept
function write_ptr (line 113) | void write_ptr( T * p ) noexcept
function read_uint (line 124) | unsigned read_uint() noexcept
function write_uint (line 131) | void write_uint( unsigned x ) noexcept
function uint_increment (line 138) | void uint_increment() noexcept
function uint_decrement (line 144) | void uint_decrement() noexcept
type boost (line 54) | namespace boost { namespace leaf {
type leaf (line 15) | namespace leaf {
type tls (line 17) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
type leaf_detail (line 56) | namespace leaf_detail
type tls (line 61) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
function tls_index (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE tls_index
function alloc_tls_index (line 86) | struct BOOST_LEAF_SYMBOL_VISIBLE alloc_tls_index
function T (line 103) | T * read_ptr() noexcept
function write_ptr (line 113) | void write_ptr( T * p ) noexcept
function read_uint (line 124) | unsigned read_uint() noexcept
function write_uint (line 131) | void write_uint( unsigned x ) noexcept
function uint_increment (line 138) | void uint_increment() noexcept
function uint_decrement (line 144) | void uint_decrement() noexcept
type leaf (line 54) | namespace leaf {
type tls (line 17) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
type leaf_detail (line 56) | namespace leaf_detail
type tls (line 61) | namespace tls
function index_counter (line 64) | class BOOST_LEAF_SYMBOL_VISIBLE index_counter
function tls_index (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE tls_index
function alloc_tls_index (line 86) | struct BOOST_LEAF_SYMBOL_VISIBLE alloc_tls_index
function T (line 103) | T * read_ptr() noexcept
function write_ptr (line 113) | void write_ptr( T * p ) noexcept
function read_uint (line 124) | unsigned read_uint() noexcept
function write_uint (line 131) | void write_uint( unsigned x ) noexcept
function uint_increment (line 138) | void uint_increment() noexcept
function uint_decrement (line 144) | void uint_decrement() noexcept
FILE: include/boost/leaf/config/tls_cpp11.hpp
type boost (line 17) | namespace boost { namespace leaf {
type leaf (line 17) | namespace leaf {
type leaf_detail (line 19) | namespace leaf_detail
type tls (line 24) | namespace tls
function ptr (line 27) | struct BOOST_LEAF_SYMBOL_VISIBLE ptr
function T (line 36) | T * read_ptr() noexcept
function write_ptr (line 42) | void write_ptr( T * p ) noexcept
function tagged_uint (line 50) | struct BOOST_LEAF_SYMBOL_VISIBLE tagged_uint
function read_uint (line 59) | unsigned read_uint() noexcept
function write_uint (line 65) | void write_uint( unsigned x ) noexcept
function uint_increment (line 71) | void uint_increment() noexcept
function uint_decrement (line 77) | void uint_decrement() noexcept
FILE: include/boost/leaf/config/tls_freertos.hpp
type boost (line 23) | namespace boost { namespace leaf {
type leaf (line 23) | namespace leaf {
type tls (line 25) | namespace tls
function write_void_ptr (line 34) | inline void write_void_ptr( int tls_index, void * p ) noexcept
FILE: include/boost/leaf/config/tls_globals.hpp
type boost (line 16) | namespace boost { namespace leaf {
type leaf (line 16) | namespace leaf {
type leaf_detail (line 18) | namespace leaf_detail
type tls (line 23) | namespace tls
function ptr (line 26) | struct BOOST_LEAF_SYMBOL_VISIBLE ptr
function T (line 35) | T * read_ptr() noexcept
function write_ptr (line 41) | void write_ptr( T * p ) noexcept
function tagged_uint (line 49) | struct BOOST_LEAF_SYMBOL_VISIBLE tagged_uint
function read_uint (line 58) | unsigned read_uint() noexcept
function write_uint (line 64) | void write_uint( unsigned x ) noexcept
function uint_increment (line 70) | void uint_increment() noexcept
function uint_decrement (line 76) | void uint_decrement() noexcept
FILE: include/boost/leaf/context.hpp
type boost (line 16) | namespace boost { namespace leaf {
type leaf (line 16) | namespace leaf {
class error_info (line 18) | class error_info
class diagnostic_info (line 19) | class diagnostic_info
class verbose_diagnostic_info (line 20) | class verbose_diagnostic_info
type is_predicate (line 23) | struct is_predicate: std::false_type
type leaf_detail (line 27) | namespace leaf_detail
type is_exception (line 30) | struct is_exception: std::is_base_of<std::exception, typename std:...
type handler_argument_traits (line 35) | struct handler_argument_traits
type handler_argument_traits_defaults (line 38) | struct handler_argument_traits_defaults
type handler_argument_traits_defaults<E, false> (line 41) | struct handler_argument_traits_defaults<E, false>
method BOOST_LEAF_CONSTEXPR (line 53) | BOOST_LEAF_CONSTEXPR static E get( Tup & tup, error_info const &...
type handler_argument_traits_defaults<Pred, true> (line 65) | struct handler_argument_traits_defaults<Pred, true>: handler_argum...
method BOOST_LEAF_CONSTEXPR (line 71) | BOOST_LEAF_CONSTEXPR static bool check( Tup const & tup, error_i...
method BOOST_LEAF_CONSTEXPR (line 78) | BOOST_LEAF_CONSTEXPR static Pred get( Tup const & tup, error_inf...
type handler_argument_always_available (line 85) | struct handler_argument_always_available
method BOOST_LEAF_CONSTEXPR (line 91) | BOOST_LEAF_CONSTEXPR static bool check( Tup &, error_info const ...
type handler_argument_traits (line 98) | struct handler_argument_traits: handler_argument_traits_defaults<E>
type handler_argument_traits<void> (line 103) | struct handler_argument_traits<void>
type handler_argument_traits<E &&> (line 113) | struct handler_argument_traits<E &&>
type handler_argument_traits<E *> (line 119) | struct handler_argument_traits<E *>: handler_argument_always_avail...
method BOOST_LEAF_CONSTEXPR (line 122) | BOOST_LEAF_CONSTEXPR static E * get( Tup & tup, error_info const...
type handler_argument_traits<error_info const &> (line 129) | struct handler_argument_traits<error_info const &>: handler_argume...
method BOOST_LEAF_CONSTEXPR (line 132) | BOOST_LEAF_CONSTEXPR static error_info const & get( Tup const &,...
type handler_argument_traits_require_by_value (line 139) | struct handler_argument_traits_require_by_value
type tuple_for_each (line 150) | struct tuple_for_each
method BOOST_LEAF_CONSTEXPR (line 152) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 159) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 166) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple & tup, int err...
method BOOST_LEAF_CONSTEXPR (line 174) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple & tup...
method print (line 185) | static void print( std::basic_ostream<CharT, Traits> & os, void ...
type tuple_for_each<0, Tuple> (line 194) | struct tuple_for_each<0, Tuple>
method BOOST_LEAF_CONSTEXPR (line 196) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 197) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 198) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple &, int ) noexc...
method BOOST_LEAF_CONSTEXPR (line 199) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple &, in...
method BOOST_LEAF_CONSTEXPR (line 201) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type requires_unexpected (line 211) | struct requires_unexpected { constexpr static bool value = false; }
type requires_unexpected<T const> (line 212) | struct requires_unexpected<T const> { constexpr static bool value ...
type requires_unexpected<T const &> (line 213) | struct requires_unexpected<T const &> { constexpr static bool valu...
type requires_unexpected<T const *> (line 214) | struct requires_unexpected<T const *> { constexpr static bool valu...
type requires_unexpected<e_unexpected_count> (line 215) | struct requires_unexpected<e_unexpected_count> { constexpr static ...
type requires_unexpected<e_unexpected_info> (line 216) | struct requires_unexpected<e_unexpected_info> { constexpr static b...
type unexpected_requested (line 219) | struct unexpected_requested
type unexpected_requested<L<>> (line 222) | struct unexpected_requested<L<>>
type does_not_participate_in_context_deduction (line 240) | struct does_not_participate_in_context_deduction: std::is_abstract...
type does_not_participate_in_context_deduction<void> (line 241) | struct does_not_participate_in_context_deduction<void>: std::true_...
type does_not_participate_in_context_deduction<error_id> (line 242) | struct does_not_participate_in_context_deduction<error_id>: std::t...
type deduce_e_type_list (line 245) | struct deduce_e_type_list
type deduce_e_tuple_impl (line 260) | struct deduce_e_tuple_impl
type leaf_detail (line 147) | namespace leaf_detail
type is_exception (line 30) | struct is_exception: std::is_base_of<std::exception, typename std:...
type handler_argument_traits (line 35) | struct handler_argument_traits
type handler_argument_traits_defaults (line 38) | struct handler_argument_traits_defaults
type handler_argument_traits_defaults<E, false> (line 41) | struct handler_argument_traits_defaults<E, false>
method BOOST_LEAF_CONSTEXPR (line 53) | BOOST_LEAF_CONSTEXPR static E get( Tup & tup, error_info const &...
type handler_argument_traits_defaults<Pred, true> (line 65) | struct handler_argument_traits_defaults<Pred, true>: handler_argum...
method BOOST_LEAF_CONSTEXPR (line 71) | BOOST_LEAF_CONSTEXPR static bool check( Tup const & tup, error_i...
method BOOST_LEAF_CONSTEXPR (line 78) | BOOST_LEAF_CONSTEXPR static Pred get( Tup const & tup, error_inf...
type handler_argument_always_available (line 85) | struct handler_argument_always_available
method BOOST_LEAF_CONSTEXPR (line 91) | BOOST_LEAF_CONSTEXPR static bool check( Tup &, error_info const ...
type handler_argument_traits (line 98) | struct handler_argument_traits: handler_argument_traits_defaults<E>
type handler_argument_traits<void> (line 103) | struct handler_argument_traits<void>
type handler_argument_traits<E &&> (line 113) | struct handler_argument_traits<E &&>
type handler_argument_traits<E *> (line 119) | struct handler_argument_traits<E *>: handler_argument_always_avail...
method BOOST_LEAF_CONSTEXPR (line 122) | BOOST_LEAF_CONSTEXPR static E * get( Tup & tup, error_info const...
type handler_argument_traits<error_info const &> (line 129) | struct handler_argument_traits<error_info const &>: handler_argume...
method BOOST_LEAF_CONSTEXPR (line 132) | BOOST_LEAF_CONSTEXPR static error_info const & get( Tup const &,...
type handler_argument_traits_require_by_value (line 139) | struct handler_argument_traits_require_by_value
type tuple_for_each (line 150) | struct tuple_for_each
method BOOST_LEAF_CONSTEXPR (line 152) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 159) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 166) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple & tup, int err...
method BOOST_LEAF_CONSTEXPR (line 174) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple & tup...
method print (line 185) | static void print( std::basic_ostream<CharT, Traits> & os, void ...
type tuple_for_each<0, Tuple> (line 194) | struct tuple_for_each<0, Tuple>
method BOOST_LEAF_CONSTEXPR (line 196) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 197) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 198) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple &, int ) noexc...
method BOOST_LEAF_CONSTEXPR (line 199) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple &, in...
method BOOST_LEAF_CONSTEXPR (line 201) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type requires_unexpected (line 211) | struct requires_unexpected { constexpr static bool value = false; }
type requires_unexpected<T const> (line 212) | struct requires_unexpected<T const> { constexpr static bool value ...
type requires_unexpected<T const &> (line 213) | struct requires_unexpected<T const &> { constexpr static bool valu...
type requires_unexpected<T const *> (line 214) | struct requires_unexpected<T const *> { constexpr static bool valu...
type requires_unexpected<e_unexpected_count> (line 215) | struct requires_unexpected<e_unexpected_count> { constexpr static ...
type requires_unexpected<e_unexpected_info> (line 216) | struct requires_unexpected<e_unexpected_info> { constexpr static b...
type unexpected_requested (line 219) | struct unexpected_requested
type unexpected_requested<L<>> (line 222) | struct unexpected_requested<L<>>
type does_not_participate_in_context_deduction (line 240) | struct does_not_participate_in_context_deduction: std::is_abstract...
type does_not_participate_in_context_deduction<void> (line 241) | struct does_not_participate_in_context_deduction<void>: std::true_...
type does_not_participate_in_context_deduction<error_id> (line 242) | struct does_not_participate_in_context_deduction<error_id>: std::t...
type deduce_e_type_list (line 245) | struct deduce_e_type_list
type deduce_e_tuple_impl (line 260) | struct deduce_e_tuple_impl
type leaf_detail (line 209) | namespace leaf_detail
type is_exception (line 30) | struct is_exception: std::is_base_of<std::exception, typename std:...
type handler_argument_traits (line 35) | struct handler_argument_traits
type handler_argument_traits_defaults (line 38) | struct handler_argument_traits_defaults
type handler_argument_traits_defaults<E, false> (line 41) | struct handler_argument_traits_defaults<E, false>
method BOOST_LEAF_CONSTEXPR (line 53) | BOOST_LEAF_CONSTEXPR static E get( Tup & tup, error_info const &...
type handler_argument_traits_defaults<Pred, true> (line 65) | struct handler_argument_traits_defaults<Pred, true>: handler_argum...
method BOOST_LEAF_CONSTEXPR (line 71) | BOOST_LEAF_CONSTEXPR static bool check( Tup const & tup, error_i...
method BOOST_LEAF_CONSTEXPR (line 78) | BOOST_LEAF_CONSTEXPR static Pred get( Tup const & tup, error_inf...
type handler_argument_always_available (line 85) | struct handler_argument_always_available
method BOOST_LEAF_CONSTEXPR (line 91) | BOOST_LEAF_CONSTEXPR static bool check( Tup &, error_info const ...
type handler_argument_traits (line 98) | struct handler_argument_traits: handler_argument_traits_defaults<E>
type handler_argument_traits<void> (line 103) | struct handler_argument_traits<void>
type handler_argument_traits<E &&> (line 113) | struct handler_argument_traits<E &&>
type handler_argument_traits<E *> (line 119) | struct handler_argument_traits<E *>: handler_argument_always_avail...
method BOOST_LEAF_CONSTEXPR (line 122) | BOOST_LEAF_CONSTEXPR static E * get( Tup & tup, error_info const...
type handler_argument_traits<error_info const &> (line 129) | struct handler_argument_traits<error_info const &>: handler_argume...
method BOOST_LEAF_CONSTEXPR (line 132) | BOOST_LEAF_CONSTEXPR static error_info const & get( Tup const &,...
type handler_argument_traits_require_by_value (line 139) | struct handler_argument_traits_require_by_value
type tuple_for_each (line 150) | struct tuple_for_each
method BOOST_LEAF_CONSTEXPR (line 152) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 159) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 166) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple & tup, int err...
method BOOST_LEAF_CONSTEXPR (line 174) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple & tup...
method print (line 185) | static void print( std::basic_ostream<CharT, Traits> & os, void ...
type tuple_for_each<0, Tuple> (line 194) | struct tuple_for_each<0, Tuple>
method BOOST_LEAF_CONSTEXPR (line 196) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 197) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 198) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple &, int ) noexc...
method BOOST_LEAF_CONSTEXPR (line 199) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple &, in...
method BOOST_LEAF_CONSTEXPR (line 201) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type requires_unexpected (line 211) | struct requires_unexpected { constexpr static bool value = false; }
type requires_unexpected<T const> (line 212) | struct requires_unexpected<T const> { constexpr static bool value ...
type requires_unexpected<T const &> (line 213) | struct requires_unexpected<T const &> { constexpr static bool valu...
type requires_unexpected<T const *> (line 214) | struct requires_unexpected<T const *> { constexpr static bool valu...
type requires_unexpected<e_unexpected_count> (line 215) | struct requires_unexpected<e_unexpected_count> { constexpr static ...
type requires_unexpected<e_unexpected_info> (line 216) | struct requires_unexpected<e_unexpected_info> { constexpr static b...
type unexpected_requested (line 219) | struct unexpected_requested
type unexpected_requested<L<>> (line 222) | struct unexpected_requested<L<>>
type does_not_participate_in_context_deduction (line 240) | struct does_not_participate_in_context_deduction: std::is_abstract...
type does_not_participate_in_context_deduction<void> (line 241) | struct does_not_participate_in_context_deduction<void>: std::true_...
type does_not_participate_in_context_deduction<error_id> (line 242) | struct does_not_participate_in_context_deduction<error_id>: std::t...
type deduce_e_type_list (line 245) | struct deduce_e_type_list
type deduce_e_tuple_impl (line 260) | struct deduce_e_tuple_impl
type leaf_detail (line 238) | namespace leaf_detail
type is_exception (line 30) | struct is_exception: std::is_base_of<std::exception, typename std:...
type handler_argument_traits (line 35) | struct handler_argument_traits
type handler_argument_traits_defaults (line 38) | struct handler_argument_traits_defaults
type handler_argument_traits_defaults<E, false> (line 41) | struct handler_argument_traits_defaults<E, false>
method BOOST_LEAF_CONSTEXPR (line 53) | BOOST_LEAF_CONSTEXPR static E get( Tup & tup, error_info const &...
type handler_argument_traits_defaults<Pred, true> (line 65) | struct handler_argument_traits_defaults<Pred, true>: handler_argum...
method BOOST_LEAF_CONSTEXPR (line 71) | BOOST_LEAF_CONSTEXPR static bool check( Tup const & tup, error_i...
method BOOST_LEAF_CONSTEXPR (line 78) | BOOST_LEAF_CONSTEXPR static Pred get( Tup const & tup, error_inf...
type handler_argument_always_available (line 85) | struct handler_argument_always_available
method BOOST_LEAF_CONSTEXPR (line 91) | BOOST_LEAF_CONSTEXPR static bool check( Tup &, error_info const ...
type handler_argument_traits (line 98) | struct handler_argument_traits: handler_argument_traits_defaults<E>
type handler_argument_traits<void> (line 103) | struct handler_argument_traits<void>
type handler_argument_traits<E &&> (line 113) | struct handler_argument_traits<E &&>
type handler_argument_traits<E *> (line 119) | struct handler_argument_traits<E *>: handler_argument_always_avail...
method BOOST_LEAF_CONSTEXPR (line 122) | BOOST_LEAF_CONSTEXPR static E * get( Tup & tup, error_info const...
type handler_argument_traits<error_info const &> (line 129) | struct handler_argument_traits<error_info const &>: handler_argume...
method BOOST_LEAF_CONSTEXPR (line 132) | BOOST_LEAF_CONSTEXPR static error_info const & get( Tup const &,...
type handler_argument_traits_require_by_value (line 139) | struct handler_argument_traits_require_by_value
type tuple_for_each (line 150) | struct tuple_for_each
method BOOST_LEAF_CONSTEXPR (line 152) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 159) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & tup ) noexcept
method BOOST_LEAF_CONSTEXPR (line 166) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple & tup, int err...
method BOOST_LEAF_CONSTEXPR (line 174) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple & tup...
method print (line 185) | static void print( std::basic_ostream<CharT, Traits> & os, void ...
type tuple_for_each<0, Tuple> (line 194) | struct tuple_for_each<0, Tuple>
method BOOST_LEAF_CONSTEXPR (line 196) | BOOST_LEAF_CONSTEXPR static void activate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 197) | BOOST_LEAF_CONSTEXPR static void deactivate( Tuple & ) noexcept { }
method BOOST_LEAF_CONSTEXPR (line 198) | BOOST_LEAF_CONSTEXPR static void propagate( Tuple &, int ) noexc...
method BOOST_LEAF_CONSTEXPR (line 199) | BOOST_LEAF_CONSTEXPR static void propagate_captured( Tuple &, in...
method BOOST_LEAF_CONSTEXPR (line 201) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type requires_unexpected (line 211) | struct requires_unexpected { constexpr static bool value = false; }
type requires_unexpected<T const> (line 212) | struct requires_unexpected<T const> { constexpr static bool value ...
type requires_unexpected<T const &> (line 213) | struct requires_unexpected<T const &> { constexpr static bool valu...
type requires_unexpected<T const *> (line 214) | struct requires_unexpected<T const *> { constexpr static bool valu...
type requires_unexpected<e_unexpected_count> (line 215) | struct requires_unexpected<e_unexpected_count> { constexpr static ...
type requires_unexpected<e_unexpected_info> (line 216) | struct requires_unexpected<e_unexpected_info> { constexpr static b...
type unexpected_requested (line 219) | struct unexpected_requested
type unexpected_requested<L<>> (line 222) | struct unexpected_requested<L<>>
type does_not_participate_in_context_deduction (line 240) | struct does_not_participate_in_context_deduction: std::is_abstract...
type does_not_participate_in_context_deduction<void> (line 241) | struct does_not_participate_in_context_deduction<void>: std::true_...
type does_not_participate_in_context_deduction<error_id> (line 242) | struct does_not_participate_in_context_deduction<error_id>: std::t...
type deduce_e_type_list (line 245) | struct deduce_e_type_list
type deduce_e_tuple_impl (line 260) | struct deduce_e_tuple_impl
class context (line 275) | class context
method context (line 277) | context( context const & ) = delete;
method context (line 278) | context & operator=( context const & ) = delete;
method BOOST_LEAF_CONSTEXPR (line 290) | BOOST_LEAF_CONSTEXPR error_id propagate_captured_errors( error_id ...
function BOOST_LEAF_CONSTEXPR (line 315) | BOOST_LEAF_CONSTEXPR Tup const & tup() const noexcept
function BOOST_LEAF_CONSTEXPR (line 320) | BOOST_LEAF_CONSTEXPR Tup & tup() noexcept
function BOOST_LEAF_CONSTEXPR (line 325) | BOOST_LEAF_CONSTEXPR void activate() noexcept
function BOOST_LEAF_CONSTEXPR (line 340) | BOOST_LEAF_CONSTEXPR void deactivate() noexcept
function BOOST_LEAF_CONSTEXPR (line 356) | BOOST_LEAF_CONSTEXPR void propagate(error_id id) noexcept
function BOOST_LEAF_CONSTEXPR (line 362) | BOOST_LEAF_CONSTEXPR bool is_active() const noexcept
function print (line 368) | void print( std::basic_ostream<CharT, Traits> & os ) const
type leaf_detail (line 382) | namespace leaf_detail
type deduce_context_impl (line 385) | struct deduce_context_impl
type fn_mp_args_fwd (line 397) | struct fn_mp_args_fwd
type context_type_from_handlers_impl (line 415) | struct context_type_from_handlers_impl
type polymorphic_context_impl (line 421) | struct polymorphic_context_impl: polymorphic_context, Ctx
method error_id (line 423) | error_id propagate_captured_errors() noexcept final override { ret...
method activate (line 424) | void activate() noexcept final override { Ctx::activate(); }
method deactivate (line 425) | void deactivate() noexcept final override { Ctx::deactivate(); }
method propagate (line 426) | void propagate(error_id id) noexcept final override { Ctx::propaga...
method is_active (line 427) | bool is_active() const noexcept final override { return Ctx::is_ac...
method print (line 429) | void print( std::ostream & os ) const final override { return Ctx:...
function BOOST_LEAF_CONSTEXPR (line 440) | BOOST_LEAF_CONSTEXPR inline context_type_from_handlers<H...> make_cont...
function BOOST_LEAF_CONSTEXPR (line 446) | BOOST_LEAF_CONSTEXPR inline context_type_from_handlers<H...> make_cont...
function context_ptr (line 456) | inline context_ptr make_shared_context() noexcept
function context_ptr (line 462) | inline context_ptr make_shared_context( H && ... ) noexcept
type unexpected_requested<L<S<Car>, S<Cdr>...>> (line 228) | struct unexpected_requested<L<S<Car>, S<Cdr>...>>
type deduce_e_type_list<L<T...>> (line 248) | struct deduce_e_type_list<L<T...>>
type deduce_e_tuple_impl<L<E...>> (line 263) | struct deduce_e_tuple_impl<L<E...>>
type deduce_context_impl<L<E...>> (line 388) | struct deduce_context_impl<L<E...>>
type fn_mp_args_fwd<std::tuple<H...> &> (line 403) | struct fn_mp_args_fwd<std::tuple<H...> &>: fn_mp_args_fwd<std::tuple<H.....
type fn_mp_args_fwd<std::tuple<H...> const &> (line 406) | struct fn_mp_args_fwd<std::tuple<H...> const &>: fn_mp_args_fwd<std::tup...
type fn_mp_args_fwd<std::tuple<H...>> (line 409) | struct fn_mp_args_fwd<std::tuple<H...>>
FILE: include/boost/leaf/detail/demangle.hpp
type boost (line 22) | namespace boost { namespace leaf {
type leaf (line 22) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 92) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 172) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type boost (line 92) | namespace boost { namespace leaf {
type leaf (line 22) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 92) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 172) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type boost (line 172) | namespace boost { namespace leaf {
type leaf (line 22) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 92) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf (line 172) | namespace leaf {
type leaf_detail (line 24) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 94) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
type leaf_detail (line 174) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 27) | BOOST_LEAF_CONSTEXPR inline char const * check_prefix( char const ...
class scoped_demangled_name (line 99) | class scoped_demangled_name
method scoped_demangled_name (line 107) | explicit scoped_demangled_name( char const * name ) noexcept :
method scoped_demangled_name (line 122) | scoped_demangled_name( scoped_demangled_name const& ) = delete;
method scoped_demangled_name (line 123) | scoped_demangled_name& operator= ( scoped_demangled_name const& ...
function demangle_free (line 135) | inline void demangle_free( char const * name ) noexcept
function demangle (line 140) | inline std::string demangle( char const * name )
function demangle_free (line 156) | inline void demangle_free( char const * ) noexcept
FILE: include/boost/leaf/detail/function_traits.hpp
type boost (line 13) | namespace boost { namespace leaf {
type leaf (line 13) | namespace leaf {
type leaf_detail (line 15) | namespace leaf_detail
type remove_noexcept (line 17) | struct remove_noexcept { using type = T; }
type gcc49_workaround (line 23) | struct gcc49_workaround //Thanks Glen Fernandes
type function_traits_impl (line 32) | struct function_traits_impl
type function_traits_impl<F, void_t<decltype(&F::operator())>> (line 38) | struct function_traits_impl<F, void_t<decltype(&F::operator())>>
type arg (line 52) | struct arg:
type function_traits_impl<F&> (line 74) | struct function_traits_impl<F&> : function_traits_impl<F> { }
type function_traits_impl<F&&> (line 75) | struct function_traits_impl<F&&> : function_traits_impl<F> { }
type function_traits_impl<R(C::*)> (line 81) | struct function_traits_impl<R(C::*)> : function_traits_impl<R(C&)>...
type function_traits (line 84) | struct function_traits: function_traits_impl<typename remove_noexc...
type remove_noexcept<R(*)(A...) noexcept> (line 18) | struct remove_noexcept<R(*)(A...) noexcept> { using type = R(*)(A...); }
type remove_noexcept<R(C::*)(A...) noexcept> (line 19) | struct remove_noexcept<R(C::*)(A...) noexcept> { using type = R(C::*)(A....
type remove_noexcept<R(C::*)(A...) const noexcept> (line 20) | struct remove_noexcept<R(C::*)(A...) const noexcept> { using type = R(C:...
type function_traits_impl<R(A...)> (line 59) | struct function_traits_impl<R(A...)>
type arg (line 67) | struct arg
type function_traits_impl<R(*)(A...)> (line 76) | struct function_traits_impl<R(*)(A...)> : function_traits_impl<R(A...)> { }
type function_traits_impl<R(* &)(A...)> (line 77) | struct function_traits_impl<R(* &)(A...)> : function_traits_impl<R(A...)...
type function_traits_impl<R(* const &)(A...)> (line 78) | struct function_traits_impl<R(* const &)(A...)> : function_traits_impl<R...
type function_traits_impl<R(C::*)(A...)> (line 79) | struct function_traits_impl<R(C::*)(A...)> : function_traits_impl<R(C&,A...
type function_traits_impl<R(C::*)(A...) const> (line 80) | struct function_traits_impl<R(C::*)(A...) const> : function_traits_impl<...
FILE: include/boost/leaf/detail/mp11.hpp
type boost (line 15) | namespace boost { namespace leaf { namespace leaf_detail_mp11 {
type leaf (line 15) | namespace leaf { namespace leaf_detail_mp11 {
type leaf_detail_mp11 (line 15) | namespace leaf_detail_mp11 {
type mp_list (line 18) | struct mp_list
type mp_identity (line 23) | struct mp_identity
type mp_inherit (line 29) | struct mp_inherit: T... {}
type detail (line 32) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 73) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 88) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 109) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 125) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 150) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 169) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 194) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type integer_sequence (line 210) | struct integer_sequence
type detail (line 215) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type detail (line 286) | namespace detail
type mp_if_c_impl (line 35) | struct mp_if_c_impl
type mp_if_c_impl<false, T, E> (line 44) | struct mp_if_c_impl<false, T, E>
type mp_set_contains_impl (line 76) | struct mp_set_contains_impl
type mp_set_push_back_impl (line 91) | struct mp_set_push_back_impl
type mp_unique_impl (line 112) | struct mp_unique_impl
type mp_append_impl (line 128) | struct mp_append_impl
type mp_append_impl<> (line 130) | struct mp_append_impl<>
type mp_front_impl (line 153) | struct mp_front_impl
type mp_pop_front_impl (line 172) | struct mp_pop_front_impl
type mp_remove_if_impl (line 197) | struct mp_remove_if_impl
type iseq_if_c_impl (line 219) | struct iseq_if_c_impl
type iseq_if_c_impl<true, T, E> (line 221) | struct iseq_if_c_impl<true, T, E>
type iseq_if_c_impl<false, T, E> (line 226) | struct iseq_if_c_impl<false, T, E>
type iseq_identity (line 234) | struct iseq_identity
type append_integer_sequence (line 239) | struct append_integer_sequence
type make_integer_sequence_impl (line 246) | struct make_integer_sequence_impl
type make_integer_sequence_impl_ (line 248) | struct make_integer_sequence_impl_
type make_integer_sequence_impl (line 267) | struct make_integer_sequence_impl: iseq_if_c<N == 0, iseq_identi...
type mp_valid_impl (line 289) | struct mp_valid_impl
type mp_if_c_impl<true, T, E...> (line 39) | struct mp_if_c_impl<true, T, E...>
type mp_set_contains_impl<L<T...>, V> (line 78) | struct mp_set_contains_impl<L<T...>, V>
type mp_set_push_back_impl<L<U...>> (line 93) | struct mp_set_push_back_impl<L<U...>>
type mp_set_push_back_impl<L<U...>, T1, T...> (line 98) | struct mp_set_push_back_impl<L<U...>, T1, T...>
type mp_unique_impl<L<T...>> (line 114) | struct mp_unique_impl<L<T...>>
type mp_append_impl<L<T...>> (line 135) | struct mp_append_impl<L<T...>>
type mp_append_impl<L1<T1...>, L2<T2...>, Lr...> (line 140) | struct mp_append_impl<L1<T1...>, L2<T2...>, Lr...>
type mp_front_impl<L<T1, T...>> (line 159) | struct mp_front_impl<L<T1, T...>>
type mp_pop_front_impl<L<T1, T...>> (line 178) | struct mp_pop_front_impl<L<T1, T...>>
type mp_remove_if_impl<L<T...>, P> (line 199) | struct mp_remove_if_impl<L<T...>, P>
type append_integer_sequence<integer_sequence<T, I...>, integer_sequence<T, J...>> (line 241) | struct append_integer_sequence<integer_sequence<T, I...>, integer_sequen...
FILE: include/boost/leaf/detail/optional.hpp
type boost (line 14) | namespace boost { namespace leaf {
type leaf (line 14) | namespace leaf {
type leaf_detail (line 16) | namespace leaf_detail
class optional (line 19) | class optional
method BOOST_LEAF_CONSTEXPR (line 28) | BOOST_LEAF_CONSTEXPR optional() noexcept:
method BOOST_LEAF_CONSTEXPR (line 33) | BOOST_LEAF_CONSTEXPR optional( optional const & x ):
method BOOST_LEAF_CONSTEXPR (line 40) | BOOST_LEAF_CONSTEXPR optional( optional && x ) noexcept:
function BOOST_LEAF_CONSTEXPR (line 64) | BOOST_LEAF_CONSTEXPR optional & operator=( optional const & x )
function BOOST_LEAF_CONSTEXPR (line 75) | BOOST_LEAF_CONSTEXPR optional & operator=( optional && x ) noexcept
function BOOST_LEAF_CONSTEXPR (line 91) | BOOST_LEAF_CONSTEXPR bool empty() const noexcept
function BOOST_LEAF_CONSTEXPR (line 96) | BOOST_LEAF_CONSTEXPR int key() const noexcept
function BOOST_LEAF_CONSTEXPR (line 101) | BOOST_LEAF_CONSTEXPR void reset() noexcept
function BOOST_LEAF_CONSTEXPR (line 110) | BOOST_LEAF_CONSTEXPR T & put( int key, T const & v )
function BOOST_LEAF_CONSTEXPR (line 119) | BOOST_LEAF_CONSTEXPR T & put( int key, T && v ) noexcept
function BOOST_LEAF_CONSTEXPR (line 128) | BOOST_LEAF_CONSTEXPR T const * has_value(int key) const noexcept
function BOOST_LEAF_CONSTEXPR (line 134) | BOOST_LEAF_CONSTEXPR T * has_value(int key) noexcept
function BOOST_LEAF_CONSTEXPR (line 140) | BOOST_LEAF_CONSTEXPR T const & value(int key) const & noexcept
function BOOST_LEAF_CONSTEXPR (line 147) | BOOST_LEAF_CONSTEXPR T & value(int key) & noexcept
function BOOST_LEAF_CONSTEXPR (line 154) | BOOST_LEAF_CONSTEXPR T const && value(int key) const && noexcept
function BOOST_LEAF_CONSTEXPR (line 161) | BOOST_LEAF_CONSTEXPR T value(int key) && noexcept
FILE: include/boost/leaf/detail/print.hpp
type boost (line 19) | namespace boost { namespace leaf {
type leaf (line 19) | namespace leaf {
type leaf_detail (line 21) | namespace leaf_detail
type is_printable (line 24) | struct is_printable: std::false_type
type is_printable<T, decltype(std::declval<std::ostream&>()<<std::declval<T const &>(), void())> (line 29) | struct is_printable<T, decltype(std::declval<std::ostream&>()<<std...
type has_printable_member_value (line 36) | struct has_printable_member_value: std::false_type
type diagnostic (line 53) | struct diagnostic
type diagnostic<Wrapper, true, ValuePrintable, IsException, IsEnum> (line 56) | struct diagnostic<Wrapper, true, ValuePrintable, IsException, IsEnum>
method print (line 61) | static void print( std::basic_ostream<CharT, Traits> & os, Wrapp...
type diagnostic<Wrapper, false, true, IsException, IsEnum> (line 68) | struct diagnostic<Wrapper, false, true, IsException, IsEnum>
method print (line 73) | static void print( std::basic_ostream<CharT, Traits> & os, Wrapp...
type diagnostic<Wrapper, false, false, true, IsEnum> (line 80) | struct diagnostic<Wrapper, false, false, true, IsEnum>
method print (line 85) | static void print( std::basic_ostream<CharT, Traits> & os, Wrapp...
type diagnostic<Wrapper, false, false, false, false> (line 92) | struct diagnostic<Wrapper, false, false, false, false>
method print (line 97) | static void print( std::basic_ostream<CharT, Traits> & os, Wrapp...
type diagnostic<Wrapper, false, false, false, true> (line 104) | struct diagnostic<Wrapper, false, false, false, true>
method print (line 109) | static void print( std::basic_ostream<CharT, Traits> & os, Wrapp...
type diagnostic<std::exception_ptr, false, false, false> (line 116) | struct diagnostic<std::exception_ptr, false, false, false>
method BOOST_LEAF_CONSTEXPR (line 121) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type has_printable_member_value<T, decltype(std::declval<std::ostream&>()<<std::declval<T const &>().value, void())> (line 41) | struct has_printable_member_value<T, decltype(std::declval<std::ostream&...
FILE: include/boost/leaf/error.hpp
type boost (line 74) | namespace boost { namespace leaf {
type leaf (line 74) | namespace leaf {
class error_id (line 76) | class error_id
type leaf_detail (line 78) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf_detail (line 106) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf (line 102) | namespace leaf {
class error_id (line 76) | class error_id
type leaf_detail (line 78) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf_detail (line 106) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type boost (line 102) | namespace boost { namespace leaf {
type leaf (line 74) | namespace leaf {
class error_id (line 76) | class error_id
type leaf_detail (line 78) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf_detail (line 106) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf (line 102) | namespace leaf {
class error_id (line 76) | class error_id
type leaf_detail (line 78) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf_detail (line 106) | namespace leaf_detail
type BOOST_LEAF_SYMBOL_VISIBLE (line 80) | struct BOOST_LEAF_SYMBOL_VISIBLE
type BOOST_LEAF_SYMBOL_VISIBLE (line 81) | struct BOOST_LEAF_SYMBOL_VISIBLE
type inject_loc (line 83) | struct inject_loc
method T (line 90) | T operator+( inject_loc loc, T && x ) noexcept
function e_unexpected_count (line 108) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_count
type diagnostic<e_unexpected_count, false, false> (line 136) | struct diagnostic<e_unexpected_count, false, false>
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
function e_unexpected_info (line 144) | class BOOST_LEAF_SYMBOL_VISIBLE e_unexpected_info
type diagnostic<e_unexpected_info, false, false> (line 175) | struct diagnostic<e_unexpected_info, false, false>
method BOOST_LEAF_CONSTEXPR (line 180) | BOOST_LEAF_CONSTEXPR static void print( std::basic_ostream<CharT...
type leaf (line 191) | namespace leaf {
function e_source_location (line 193) | struct BOOST_LEAF_SYMBOL_VISIBLE e_source_location
type leaf_detail (line 208) | namespace leaf_detail
class BOOST_LEAF_SYMBOL_VISIBLE (line 211) | class BOOST_LEAF_SYMBOL_VISIBLE
function slot (line 214) | slot( slot const & ) = delete;
function BOOST_LEAF_CONSTEXPR (line 234) | BOOST_LEAF_CONSTEXPR void activate() noexcept
function BOOST_LEAF_CONSTEXPR (line 240) | BOOST_LEAF_CONSTEXPR void deactivate() noexcept
function print (line 248) | void print( std::basic_ostream<CharT, Traits> & os, int key_to_print...
function BOOST_LEAF_CONSTEXPR (line 278) | BOOST_LEAF_CONSTEXPR inline void load_unexpected_count( int err_id ) n...
function BOOST_LEAF_CONSTEXPR (line 290) | BOOST_LEAF_CONSTEXPR inline void load_unexpected_info( int err_id, E &...
function BOOST_LEAF_CONSTEXPR (line 302) | BOOST_LEAF_CONSTEXPR inline void load_unexpected( int err_id, E && e ...
function BOOST_LEAF_CONSTEXPR (line 311) | BOOST_LEAF_CONSTEXPR inline void slot<E>::propagate( int err_id ) noex...
function BOOST_LEAF_CONSTEXPR (line 329) | BOOST_LEAF_CONSTEXPR inline int load_slot( int err_id, E && e ) noexcept
function BOOST_LEAF_CONSTEXPR (line 350) | BOOST_LEAF_CONSTEXPR inline int accumulate_slot( int err_id, F && f ) ...
type leaf_detail (line 369) | namespace leaf_detail
function id_factory (line 372) | struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
function current_id (line 387) | inline int current_id() noexcept
function new_id (line 394) | inline int new_id() noexcept
type load_item (line 407) | struct load_item
type load_item<E, -1> (line 413) | struct load_item<E, -1>
method BOOST_LEAF_CONSTEXPR (line 415) | BOOST_LEAF_CONSTEXPR static int load( int err_id, E && e ) noexcept
type load_item<F, 0> (line 422) | struct load_item<F, 0>
method BOOST_LEAF_CONSTEXPR (line 424) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
type load_item<F, 1> (line 431) | struct load_item<F, 1>
method BOOST_LEAF_CONSTEXPR (line 433) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
class leaf_category (line 445) | class leaf_category final: public std::error_category
method equivalent (line 447) | bool equivalent( int, std::error_condition const & ) const noexcept...
method equivalent (line 448) | bool equivalent( std::error_code const &, int ) const noexcept final...
method message (line 450) | std::string message( int ) const final override { return name(); }
type get_error_category (line 456) | struct get_error_category
function import_error_code (line 464) | inline int import_error_code( std::error_code const & ec ) noexcept
function BOOST_LEAF_CONSTEXPR (line 604) | BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept
type leaf_detail (line 404) | namespace leaf_detail
function id_factory (line 372) | struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
function current_id (line 387) | inline int current_id() noexcept
function new_id (line 394) | inline int new_id() noexcept
type load_item (line 407) | struct load_item
type load_item<E, -1> (line 413) | struct load_item<E, -1>
method BOOST_LEAF_CONSTEXPR (line 415) | BOOST_LEAF_CONSTEXPR static int load( int err_id, E && e ) noexcept
type load_item<F, 0> (line 422) | struct load_item<F, 0>
method BOOST_LEAF_CONSTEXPR (line 424) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
type load_item<F, 1> (line 431) | struct load_item<F, 1>
method BOOST_LEAF_CONSTEXPR (line 433) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
class leaf_category (line 445) | class leaf_category final: public std::error_category
method equivalent (line 447) | bool equivalent( int, std::error_condition const & ) const noexcept...
method equivalent (line 448) | bool equivalent( std::error_code const &, int ) const noexcept final...
method message (line 450) | std::string message( int ) const final override { return name(); }
type get_error_category (line 456) | struct get_error_category
function import_error_code (line 464) | inline int import_error_code( std::error_code const & ec ) noexcept
function BOOST_LEAF_CONSTEXPR (line 604) | BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept
type leaf_detail (line 443) | namespace leaf_detail
function id_factory (line 372) | struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
function current_id (line 387) | inline int current_id() noexcept
function new_id (line 394) | inline int new_id() noexcept
type load_item (line 407) | struct load_item
type load_item<E, -1> (line 413) | struct load_item<E, -1>
method BOOST_LEAF_CONSTEXPR (line 415) | BOOST_LEAF_CONSTEXPR static int load( int err_id, E && e ) noexcept
type load_item<F, 0> (line 422) | struct load_item<F, 0>
method BOOST_LEAF_CONSTEXPR (line 424) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
type load_item<F, 1> (line 431) | struct load_item<F, 1>
method BOOST_LEAF_CONSTEXPR (line 433) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
class leaf_category (line 445) | class leaf_category final: public std::error_category
method equivalent (line 447) | bool equivalent( int, std::error_condition const & ) const noexcept...
method equivalent (line 448) | bool equivalent( std::error_code const &, int ) const noexcept final...
method message (line 450) | std::string message( int ) const final override { return name(); }
type get_error_category (line 456) | struct get_error_category
function import_error_code (line 464) | inline int import_error_code( std::error_code const & ec ) noexcept
function BOOST_LEAF_CONSTEXPR (line 604) | BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept
function is_error_id (line 486) | inline bool is_error_id( std::error_code const & ec ) noexcept
type leaf_detail (line 496) | namespace leaf_detail
function id_factory (line 372) | struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
function current_id (line 387) | inline int current_id() noexcept
function new_id (line 394) | inline int new_id() noexcept
type load_item (line 407) | struct load_item
type load_item<E, -1> (line 413) | struct load_item<E, -1>
method BOOST_LEAF_CONSTEXPR (line 415) | BOOST_LEAF_CONSTEXPR static int load( int err_id, E && e ) noexcept
type load_item<F, 0> (line 422) | struct load_item<F, 0>
method BOOST_LEAF_CONSTEXPR (line 424) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
type load_item<F, 1> (line 431) | struct load_item<F, 1>
method BOOST_LEAF_CONSTEXPR (line 433) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
class leaf_category (line 445) | class leaf_category final: public std::error_category
method equivalent (line 447) | bool equivalent( int, std::error_condition const & ) const noexcept...
method equivalent (line 448) | bool equivalent( std::error_code const &, int ) const noexcept final...
method message (line 450) | std::string message( int ) const final override { return name(); }
type get_error_category (line 456) | struct get_error_category
function import_error_code (line 464) | inline int import_error_code( std::error_code const & ec ) noexcept
function BOOST_LEAF_CONSTEXPR (line 604) | BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept
function error_id (line 501) | class BOOST_LEAF_SYMBOL_VISIBLE error_id
type leaf_detail (line 602) | namespace leaf_detail
function id_factory (line 372) | struct BOOST_LEAF_SYMBOL_VISIBLE id_factory
function current_id (line 387) | inline int current_id() noexcept
function new_id (line 394) | inline int new_id() noexcept
type load_item (line 407) | struct load_item
type load_item<E, -1> (line 413) | struct load_item<E, -1>
method BOOST_LEAF_CONSTEXPR (line 415) | BOOST_LEAF_CONSTEXPR static int load( int err_id, E && e ) noexcept
type load_item<F, 0> (line 422) | struct load_item<F, 0>
method BOOST_LEAF_CONSTEXPR (line 424) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
type load_item<F, 1> (line 431) | struct load_item<F, 1>
method BOOST_LEAF_CONSTEXPR (line 433) | BOOST_LEAF_CONSTEXPR static int load( int err_id, F && f ) noexcept
class leaf_category (line 445) | class leaf_category final: public std::error_category
method equivalent (line 447) | bool equivalent( int, std::error_condition const & ) const noexcept...
method equivalent (line 448) | bool equivalent( std::error_code const &, int ) const noexcept final...
method message (line 450) | std::string message( int ) const final override { return name(); }
type get_error_category (line 456) | struct get_error_category
function import_error_code (line 464) | inline int import_error_code( std::error_code const & ec ) noexcept
function BOOST_LEAF_CONSTEXPR (line 604) | BOOST_LEAF_CONSTEXPR inline error_id make_error_id( int err_id ) noexcept
function error_id (line 611) | inline error_id new_error() noexcept
function error_id (line 617) | inline error_id new_error( Item && ... item ) noexcept
function error_id (line 622) | inline error_id current_error() noexcept
class polymorphic_context (line 629) | class polymorphic_context
method polymorphic_context (line 633) | polymorphic_context() noexcept = default;
function context_activator (line 656) | context_activator( context_activator const & ) = delete;
function context_activator (line 657) | context_activator & operator=( context_activator const & ) = delete;
function ctx_ (line 670) | ctx_(ctx.is_active() ? nullptr : &ctx)
function uncaught_exceptions_ (line 678) | uncaught_exceptions_(x.uncaught_exceptions_),
function BOOST_LEAF_CONSTEXPR (line 693) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE context_activator<Ctx> act...
type is_result_type (line 701) | struct is_result_type: std::false_type
type is_result_type<R const> (line 706) | struct is_result_type<R const>: is_result_type<R>
FILE: include/boost/leaf/exception.hpp
type boost (line 15) | namespace boost
type leaf (line 20) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 49) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 86) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 109) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type boost (line 20) | namespace boost { namespace leaf {
type leaf (line 20) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 49) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 86) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 109) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type boost (line 49) | namespace boost { namespace leaf {
type leaf (line 20) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 49) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 86) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 109) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type boost (line 86) | namespace boost { namespace leaf {
type leaf (line 20) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 49) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 86) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 109) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type boost (line 109) | namespace boost { namespace leaf {
type leaf (line 20) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 49) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 86) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type leaf (line 109) | namespace leaf {
type leaf_detail (line 22) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 51) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 88) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
type leaf_detail (line 111) | namespace leaf_detail
function throw_exception_impl (line 25) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 30) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
function throw_exception_impl (line 54) | [[noreturn]] void throw_exception_impl( T && e )
function exception_base (line 59) | class BOOST_LEAF_SYMBOL_VISIBLE exception_base
type throw_with_loc (line 90) | struct throw_with_loc
method friend (line 97) | [[noreturn]] friend void operator+( throw_with_loc loc, Ex && ex )
function enforce_std_exception (line 113) | inline void enforce_std_exception( std::exception const & ) noexce...
class BOOST_LEAF_SYMBOL_VISIBLE (line 116) | class BOOST_LEAF_SYMBOL_VISIBLE
function exception (line 129) | exception( exception && ) = default;
type at_least_one_derives_from_std_exception (line 153) | struct at_least_one_derives_from_std_exception
type at_least_one_derives_from_std_exception<> (line 156) | struct at_least_one_derives_from_std_exception<>: std::false_type { }
type at_least_one_derives_from_std_exception<T, Rest...> (line 159) | struct at_least_one_derives_from_std_exception<T, Rest...>
function make_exception (line 165) | inline
function make_exception (line 174) | inline
function make_exception (line 182) | inline exception<std::exception> make_exception( error_id err ) noexcept
function make_exception (line 188) | inline
function make_exception (line 197) | inline
function make_exception (line 205) | inline exception<std::exception> make_exception() noexcept
function throw_exception (line 212) | [[noreturn]] void throw_exception( E && ... e )
class result (line 226) | class result
type leaf_detail (line 228) | namespace leaf_detail
function error_id (line 230) | inline error_id catch_exceptions_helper( std::exception const &, leaf_...
function error_id (line 236) | inline error_id catch_exceptions_helper( std::exception const & ex, le...
type deduce_exception_to_result_return_type_impl (line 245) | struct deduce_exception_to_result_return_type_impl
type deduce_exception_to_result_return_type_impl<result<T>> (line 251) | struct deduce_exception_to_result_return_type_impl<result<T>>
function exception_to_result (line 261) | inline
FILE: include/boost/leaf/handle_errors.hpp
type leaf (line 14) | namespace leaf {
function error_info (line 16) | class BOOST_LEAF_SYMBOL_VISIBLE error_info
function diagnostic_info (line 104) | class BOOST_LEAF_SYMBOL_VISIBLE diagnostic_info: public error_info
type leaf_detail (line 138) | namespace leaf_detail
type diagnostic_info_ (line 140) | struct diagnostic_info_: diagnostic_info
method BOOST_LEAF_CONSTEXPR (line 143) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei, leaf...
method BOOST_LEAF_CONSTEXPR (line 190) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei ) noe...
type handler_argument_traits<diagnostic_info const &> (line 150) | struct handler_argument_traits<diagnostic_info const &>: handler_arg...
method BOOST_LEAF_CONSTEXPR (line 153) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const & tup,...
method BOOST_LEAF_CONSTEXPR (line 200) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const &, err...
type diagnostic_info_ (line 188) | struct diagnostic_info_: diagnostic_info
method BOOST_LEAF_CONSTEXPR (line 143) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei, leaf...
method BOOST_LEAF_CONSTEXPR (line 190) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei ) noe...
type handler_argument_traits<diagnostic_info const &> (line 197) | struct handler_argument_traits<diagnostic_info const &>: handler_arg...
method BOOST_LEAF_CONSTEXPR (line 153) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const & tup,...
method BOOST_LEAF_CONSTEXPR (line 200) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const &, err...
function diagnostic_info (line 162) | class BOOST_LEAF_SYMBOL_VISIBLE diagnostic_info: public error_info
type leaf_detail (line 186) | namespace leaf_detail
type diagnostic_info_ (line 140) | struct diagnostic_info_: diagnostic_info
method BOOST_LEAF_CONSTEXPR (line 143) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei, leaf...
method BOOST_LEAF_CONSTEXPR (line 190) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei ) noe...
type handler_argument_traits<diagnostic_info const &> (line 150) | struct handler_argument_traits<diagnostic_info const &>: handler_arg...
method BOOST_LEAF_CONSTEXPR (line 153) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const & tup,...
method BOOST_LEAF_CONSTEXPR (line 200) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const &, err...
type diagnostic_info_ (line 188) | struct diagnostic_info_: diagnostic_info
method BOOST_LEAF_CONSTEXPR (line 143) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei, leaf...
method BOOST_LEAF_CONSTEXPR (line 190) | BOOST_LEAF_CONSTEXPR diagnostic_info_( error_info const & ei ) noe...
type handler_argument_traits<diagnostic_info const &> (line 197) | struct handler_argument_traits<diagnostic_info const &>: handler_arg...
method BOOST_LEAF_CONSTEXPR (line 153) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const & tup,...
method BOOST_LEAF_CONSTEXPR (line 200) | BOOST_LEAF_CONSTEXPR static diagnostic_info_ get( Tup const &, err...
function verbose_diagnostic_info (line 213) | class BOOST_LEAF_SYMBOL_VISIBLE verbose_diagnostic_info: public error_...
type boost (line 899) | namespace boost { class exception; }
class exception (line 899) | class exception
class error_info (line 900) | class error_info
type exception_detail (line 901) | namespace exception_detail { template <class ErrorInfo> struct get_inf...
type get_info (line 901) | struct get_info
type leaf (line 903) | namespace leaf {
type leaf_detail (line 905) | namespace leaf_detail
type match_enum_type (line 908) | struct match_enum_type
type match_enum_type<boost::error_info<Tag, T>> (line 911) | struct match_enum_type<boost::error_info<Tag, T>>
function BOOST_LEAF_CONSTEXPR (line 917) | BOOST_LEAF_CONSTEXPR inline Ex * get_exception( error_info const &...
type dependent_type (line 923) | struct dependent_type { using type = T; }
type handler_argument_traits<boost::error_info<Tag, T>> (line 929) | struct handler_argument_traits<boost::error_info<Tag, T>>
method BOOST_LEAF_CONSTEXPR (line 935) | BOOST_LEAF_CONSTEXPR static T * check( Tup &, error_info const &...
method BOOST_LEAF_CONSTEXPR (line 945) | BOOST_LEAF_CONSTEXPR static boost::error_info<Tag, T> get( Tup c...
type handler_argument_traits<boost::error_info<Tag, T> const &> (line 951) | struct handler_argument_traits<boost::error_info<Tag, T> const &>:...
type handler_argument_traits<boost::error_info<Tag, T> const *> (line 952) | struct handler_argument_traits<boost::error_info<Tag, T> const *>:...
type handler_argument_traits<boost::error_info<Tag, T> &> (line 953) | struct handler_argument_traits<boost::error_info<Tag, T> &>: handl...
type handler_argument_traits<boost::error_info<Tag, T> *> (line 954) | struct handler_argument_traits<boost::error_info<Tag, T> *>: handl...
type boost (line 900) | namespace boost { template <class Tag,class T> class error_info; }
class exception (line 899) | class exception
class error_info (line 900) | class error_info
type exception_detail (line 901) | namespace exception_detail { template <class ErrorInfo> struct get_inf...
type get_info (line 901) | struct get_info
type leaf (line 903) | namespace leaf {
type leaf_detail (line 905) | namespace leaf_detail
type match_enum_type (line 908) | struct match_enum_type
type match_enum_type<boost::error_info<Tag, T>> (line 911) | struct match_enum_type<boost::error_info<Tag, T>>
function BOOST_LEAF_CONSTEXPR (line 917) | BOOST_LEAF_CONSTEXPR inline Ex * get_exception( error_info const &...
type dependent_type (line 923) | struct dependent_type { using type = T; }
type handler_argument_traits<boost::error_info<Tag, T>> (line 929) | struct handler_argument_traits<boost::error_info<Tag, T>>
method BOOST_LEAF_CONSTEXPR (line 935) | BOOST_LEAF_CONSTEXPR static T * check( Tup &, error_info const &...
method BOOST_LEAF_CONSTEXPR (line 945) | BOOST_LEAF_CONSTEXPR static boost::error_info<Tag, T> get( Tup c...
type handler_argument_traits<boost::error_info<Tag, T> const &> (line 951) | struct handler_argument_traits<boost::error_info<Tag, T> const &>:...
type handler_argument_traits<boost::error_info<Tag, T> const *> (line 952) | struct handler_argument_traits<boost::error_info<Tag, T> const *>:...
type handler_argument_traits<boost::error_info<Tag, T> &> (line 953) | struct handler_argument_traits<boost::error_info<Tag, T> &>: handl...
type handler_argument_traits<boost::error_info<Tag, T> *> (line 954) | struct handler_argument_traits<boost::error_info<Tag, T> *>: handl...
type boost (line 901) | namespace boost { namespace exception_detail { template <class ErrorInfo...
class exception (line 899) | class exception
class error_info (line 900) | class error_info
type exception_detail (line 901) | namespace exception_detail { template <class ErrorInfo> struct get_inf...
type get_info (line 901) | struct get_info
type leaf (line 903) | namespace leaf {
type leaf_detail (line 905) | namespace leaf_detail
type match_enum_type (line 908) | struct match_enum_type
type match_enum_type<boost::error_info<Tag, T>> (line 911) | struct match_enum_type<boost::error_info<Tag, T>>
function BOOST_LEAF_CONSTEXPR (line 917) | BOOST_LEAF_CONSTEXPR inline Ex * get_exception( error_info const &...
type dependent_type (line 923) | struct dependent_type { using type = T; }
type handler_argument_traits<boost::error_info<Tag, T>> (line 929) | struct handler_argument_traits<boost::error_info<Tag, T>>
method BOOST_LEAF_CONSTEXPR (line 935) | BOOST_LEAF_CONSTEXPR static T * check( Tup &, error_info const &...
method BOOST_LEAF_CONSTEXPR (line 945) | BOOST_LEAF_CONSTEXPR static boost::error_info<Tag, T> get( Tup c...
type handler_argument_traits<boost::error_info<Tag, T> const &> (line 951) | struct handler_argument_traits<boost::error_info<Tag, T> const &>:...
type handler_argument_traits<boost::error_info<Tag, T> const *> (line 952) | struct handler_argument_traits<boost::error_info<Tag, T> const *>:...
type handler_argument_traits<boost::error_info<Tag, T> &> (line 953) | struct handler_argument_traits<boost::error_info<Tag, T> &>: handl...
type handler_argument_traits<boost::error_info<Tag, T> *> (line 954) | struct handler_argument_traits<boost::error_info<Tag, T> *>: handl...
type boost (line 903) | namespace boost { namespace leaf {
class exception (line 899) | class exception
class error_info (line 900) | class error_info
type exception_detail (line 901) | namespace exception_detail { template <class ErrorInfo> struct get_inf...
type get_info (line 901) | struct get_info
type leaf (line 903) | namespace leaf {
type leaf_detail (line 905) | namespace leaf_detail
type match_enum_type (line 908) | struct match_enum_type
type match_enum_type<boost::error_info<Tag, T>> (line 911) | struct match_enum_type<boost::error_info<Tag, T>>
function BOOST_LEAF_CONSTEXPR (line 917) | BOOST_LEAF_CONSTEXPR inline Ex * get_exception( error_info const &...
type dependent_type (line 923) | struct dependent_type { using type = T; }
type handler_argument_traits<boost::error_info<Tag, T>> (line 929) | struct handler_argument_traits<boost::error_info<Tag, T>>
method BOOST_LEAF_CONSTEXPR (line 935) | BOOST_LEAF_CONSTEXPR static T * check( Tup &, error_info const &...
method BOOST_LEAF_CONSTEXPR (line 945) | BOOST_LEAF_CONSTEXPR static boost::error_info<Tag, T> get( Tup c...
type handler_argument_traits<boost::error_info<Tag, T> const &> (line 951) | struct handler_argument_traits<boost::error_info<Tag, T> const &>:...
type handler_argument_traits<boost::error_info<Tag, T> const *> (line 952) | struct handler_argument_traits<boost::error_info<Tag, T> const *>:...
type handler_argument_traits<boost::error_info<Tag, T> &> (line 953) | struct handler_argument_traits<boost::error_info<Tag, T> &>: handl...
type handler_argument_traits<boost::error_info<Tag, T> *> (line 954) | struct handler_argument_traits<boost::error_info<Tag, T> *>: handl...
FILE: include/boost/leaf/on_error.hpp
type boost (line 12) | namespace boost { namespace leaf {
type leaf (line 12) | namespace leaf {
class error_monitor (line 14) | class error_monitor
method err_id_ (line 27) | err_id_(leaf_detail::current_id())
method check_id (line 31) | int check_id() const noexcept
method get_id (line 50) | int get_id() const noexcept
method error_id (line 59) | error_id check() const noexcept
method error_id (line 64) | error_id assigned_error_id() const noexcept
type leaf_detail (line 72) | namespace leaf_detail
type tuple_for_each_preload (line 75) | struct tuple_for_each_preload
method BOOST_LEAF_CONSTEXPR (line 77) | BOOST_LEAF_CONSTEXPR static void trigger( Tuple & tup, int err_i...
type tuple_for_each_preload<0, Tuple> (line 86) | struct tuple_for_each_preload<0, Tuple>
method BOOST_LEAF_CONSTEXPR (line 88) | BOOST_LEAF_CONSTEXPR static void trigger( Tuple const &, int ) n...
class preloaded_item (line 92) | class preloaded_item
method BOOST_LEAF_CONSTEXPR (line 106) | BOOST_LEAF_CONSTEXPR void trigger( int err_id ) noexcept
class deferred_item (line 127) | class deferred_item
method BOOST_LEAF_CONSTEXPR (line 141) | BOOST_LEAF_CONSTEXPR void trigger( int err_id ) noexcept
class accumulating_item (line 162) | class accumulating_item
class accumulating_item<F, A0 &, 1> (line 165) | class accumulating_item<F, A0 &, 1>
method BOOST_LEAF_CONSTEXPR (line 179) | BOOST_LEAF_CONSTEXPR void trigger( int err_id ) noexcept
class preloaded (line 193) | class preloaded
method preloaded (line 195) | preloaded & operator=( preloaded const & ) = delete;
method preloaded (line 203) | preloaded( Item && ... i ):
type deduce_item_type (line 227) | struct deduce_item_type
type deduce_item_type<T, -1> (line 230) | struct deduce_item_type<T, -1>
type deduce_item_type<F, 0> (line 236) | struct deduce_item_type<F, 0>
type deduce_item_type<F, 1> (line 242) | struct deduce_item_type<F, 1>
function BOOST_LEAF_NODISCARD (line 249) | BOOST_LEAF_NODISCARD BOOST_LEAF_CONSTEXPR inline
FILE: include/boost/leaf/pred.hpp
type boost (line 19) | namespace boost { namespace leaf {
type leaf (line 19) | namespace leaf {
type leaf_detail (line 21) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 25) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 32) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 40) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 46) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
type match_enum_type (line 82) | struct match_enum_type
type match_enum_type<condition<Enum, Enum>> (line 89) | struct match_enum_type<condition<Enum, Enum>>
type match_enum_type<condition<E, Enum>> (line 95) | struct match_enum_type<condition<E, Enum>>
type match_value_enum_type (line 139) | struct match_value_enum_type
type match_value_enum_type<condition<E, Enum>> (line 146) | struct match_value_enum_type<condition<E, Enum>>
type match_value_enum_type<condition<Enum, Enum>> (line 152) | struct match_value_enum_type<condition<Enum, Enum>>
function BOOST_LEAF_CONSTEXPR (line 242) | BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::except...
function BOOST_LEAF_CONSTEXPR (line 248) | BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::except...
function BOOST_LEAF_CONSTEXPR (line 253) | BOOST_LEAF_CONSTEXPR inline bool check_exception_pack( std::except...
type condition (line 56) | struct condition
type condition<Enum, Enum> (line 62) | struct condition<Enum, Enum>
function BOOST_LEAF_CONSTEXPR (line 69) | BOOST_LEAF_CONSTEXPR inline bool category( std::error_code const & ec )
type leaf_detail (line 79) | namespace leaf_detail
function BOOST_LEAF_CONSTEXPR (line 25) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 32) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 40) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
function BOOST_LEAF_CONSTEXPR (line 46) | BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE bool cmp_value_pack(...
type match_enum_type (line 82) | struct match_enum_type
type match_enum_type<condition<Enum, Enum>> (line 89) | struct match_enum_type<condition<Enum, Enum>>
type match_enum_type<condition<E, Enum>> (line 95) | struct match_enum_type<condition<E, Enum>>
type match_value_enum_type (line 139) | struct match_value_enum_type
type match_value_enum_type<condition<E, Enum>> (line 146) | st
Condensed preview — 185 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,084K chars).
[
{
"path": ".drone/drone.sh",
"chars": 2245,
"preview": "#!/bin/bash\n\n# Copyright 2020 Rene Rivera, Sam Darwin\n# Distributed under the Boost Software License, Version 1.0.\n# (Se"
},
{
"path": ".drone.star",
"chars": 11676,
"preview": "# Use, modification, and distribution are\n# subject to the Boost Software License, Version 1.0. (See accompanying\n# file"
},
{
"path": ".gitattributes",
"chars": 3917,
"preview": "* text=auto !eol svneol=native#text/plain\n*.gitattributes text svneol=native#text/plain\n\n# Scriptish formats\n*.bat "
},
{
"path": ".github/workflows/ci.yml",
"chars": 5750,
"preview": "name: CI\n\non:\n pull_request:\n push:\n branches:\n - master\n - develop\n - feature/**\n\nenv:\n UBSAN_OPTI"
},
{
"path": ".github/workflows/gh-pages.yml",
"chars": 1485,
"preview": "name: documentation\n\non:\n push:\n branches:\n - master\n\njobs:\n publish:\n runs-on: ubuntu-latest\n steps:\n "
},
{
"path": ".gitignore",
"chars": 221,
"preview": ".DS_Store\n.Trashes\n*.suo\n*.user\n*.log\n*.sdf\n*.opensdf\n*.db\n*.opendb\nbld/*\ndoc/html/*\nsnippets/*\nsubprojects/*/\n.vscode/i"
},
{
"path": ".travis.yml",
"chars": 11350,
"preview": "# Copyright 2016-2018 Peter Dimov\n# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n# Distributed under th"
},
{
"path": ".vscode/launch.json",
"chars": 630,
"preview": "{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n"
},
{
"path": ".vscode/tasks.json",
"chars": 5216,
"preview": "{\n // See https://go.microsoft.com/fwlink/?LinkId=733558\n // for the documentation about the tasks.json format\n "
},
{
"path": "CMakeLists.txt",
"chars": 539,
"preview": "# Generated by `boostdep --cmake leaf`\n# Copyright 2020 Peter Dimov\n# Distributed under the Boost Software License, Vers"
},
{
"path": "LICENSE_1_0.txt",
"chars": 1338,
"preview": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or"
},
{
"path": "README.md",
"chars": 1275,
"preview": "# LEAF\n\n> A lightweight error handling library for C++11.\n\n## Documentation\n\nhttps://boostorg.github.io/leaf/\n\n## Featur"
},
{
"path": "appveyor.yml",
"chars": 1423,
"preview": "# Copyright 2016, 2017 Peter Dimov\n# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n# Distributed under t"
},
{
"path": "benchmark/b.bat",
"chars": 91,
"preview": "ninja\ndel benchmark.csv\ndeep_stack_leaf\ndeep_stack_tl\ndeep_stack_result\ndeep_stack_outcome\n"
},
{
"path": "benchmark/b.sh",
"chars": 98,
"preview": "ninja\nrm benchmark.csv\n./deep_stack_leaf\n./deep_stack_tl\n./deep_stack_result\n./deep_stack_outcome\n"
},
{
"path": "benchmark/benchmark.md",
"chars": 14581,
"preview": "# Benchmark\n\nThe LEAF github repository contains two similar benchmarking programs, one using LEAF, the other configurab"
},
{
"path": "benchmark/deep_stack_leaf.cpp",
"chars": 6889,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "benchmark/deep_stack_other.cpp",
"chars": 7694,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "conanfile.py",
"chars": 2753,
"preview": "from conan import ConanFile\nfrom conan.tools.files import copy\nfrom conan.tools.layout import basic_layout\nfrom conan.to"
},
{
"path": "doc/Jamfile",
"chars": 792,
"preview": "# Copyright 2017 Peter Dimov\n# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n#\n# Distributed under the B"
},
{
"path": "doc/docinfo.html",
"chars": 475,
"preview": "<meta name=\"keywords\" content=\"c++,error handling,open source\">\n<meta name=\"description\" content=\"Lightweight Error Augm"
},
{
"path": "doc/leaf-theme.yml",
"chars": 466,
"preview": "extends: default\nbase:\n font:\n color: #404040\nliteral:\n font:\n family: Courier\n color: #000000\nadmonition:\n "
},
{
"path": "doc/leaf.adoc",
"chars": 205820,
"preview": ":last-update-label!:\n:icons: font\n:prewrap!:\n:docinfo: shared\n:stylesheet: zajo-dark.css\n:source-highlighter: rouge\n\nifd"
},
{
"path": "doc/rouge-github.css",
"chars": 2707,
"preview": ".highlight table td { padding: 5px; }\n.highlight table pre { margin: 0; }\n.highlight .cm {\n color: #999988;\n font-styl"
},
{
"path": "doc/whitepaper.md",
"chars": 38947,
"preview": "# Error Handling Principles and Practices\n\n## Abstract\n\nError handling is an important part of language design and progr"
},
{
"path": "doc/zajo-dark.css",
"chars": 35511,
"preview": "/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */\n/* Uncomment @import statement below to use "
},
{
"path": "doc/zajo-light.css",
"chars": 34399,
"preview": "/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */\n/* Uncomment @import statement below to use "
},
{
"path": "example/asio_beast_leaf_rpc.cpp",
"chars": 24372,
"preview": "// Copyright (c) 2019 Sorin Fetche\n\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// f"
},
{
"path": "example/capture_in_exception.cpp",
"chars": 3340,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/capture_in_result.cpp",
"chars": 3908,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/error_log.cpp",
"chars": 3925,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/error_trace.cpp",
"chars": 4031,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/exception_to_result.cpp",
"chars": 3650,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/lua_callback_eh.cpp",
"chars": 5703,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/lua_callback_result.cpp",
"chars": 5381,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/print_file/print_file_eh.cpp",
"chars": 6352,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/print_file/print_file_outcome_result.cpp",
"chars": 7461,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/print_file/print_file_result.cpp",
"chars": 7012,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/print_file/readme.md",
"chars": 734,
"preview": "# Print File Example\n\nThis directory has three versions of the same simple program, which reads a\nfile, prints it to sta"
},
{
"path": "example/print_half.cpp",
"chars": 3513,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "example/readme.md",
"chars": 1993,
"preview": "# Example Programs Using LEAF to Handle Errors\n\n* [print_file](./print_file): The complete example from the [Five Minute"
},
{
"path": "gen/generate_single_header.py",
"chars": 3927,
"preview": "\"\"\"\n\n Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n Copyright (c) Sorin Fetche\n\n Distributed u"
},
{
"path": "include/boost/leaf/capture.hpp",
"chars": 6486,
"preview": "#ifndef BOOST_LEAF_CAPTURE_HPP_INCLUDED\n#define BOOST_LEAF_CAPTURE_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski "
},
{
"path": "include/boost/leaf/common.hpp",
"chars": 2929,
"preview": "#ifndef BOOST_LEAF_COMMON_HPP_INCLUDED\n#define BOOST_LEAF_COMMON_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski an"
},
{
"path": "include/boost/leaf/config/tls.hpp",
"chars": 1123,
"preview": "#ifndef BOOST_LEAF_CONFIG_TLS_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_TLS_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotch"
},
{
"path": "include/boost/leaf/config/tls_array.hpp",
"chars": 4207,
"preview": "#ifndef BOOST_LEAF_CONFIG_TLS_ARRAY_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_TLS_ARRAY_HPP_INCLUDED\n\n// Copyright 2018-202"
},
{
"path": "include/boost/leaf/config/tls_cpp11.hpp",
"chars": 1780,
"preview": "#ifndef BOOST_LEAF_CONFIG_TLS_CPP11_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_TLS_CPP11_HPP_INCLUDED\n\n// Copyright 2018-202"
},
{
"path": "include/boost/leaf/config/tls_freertos.hpp",
"chars": 1132,
"preview": "#ifndef BOOST_LEAF_CONFIG_TLS_FREERTOS_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_TLS_FREERTOS_HPP_INCLUDED\n\n// Copyright 20"
},
{
"path": "include/boost/leaf/config/tls_globals.hpp",
"chars": 1705,
"preview": "#ifndef BOOST_LEAF_CONFIG_TLS_GLOBALS_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_TLS_GLOBALS_HPP_INCLUDED\n\n// Copyright 2018"
},
{
"path": "include/boost/leaf/config.hpp",
"chars": 6497,
"preview": "#ifndef BOOST_LEAF_CONFIG_HPP_INCLUDED\n#define BOOST_LEAF_CONFIG_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski an"
},
{
"path": "include/boost/leaf/context.hpp",
"chars": 15315,
"preview": "#ifndef BOOST_LEAF_CONTEXT_HPP_INCLUDED\n#define BOOST_LEAF_CONTEXT_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski "
},
{
"path": "include/boost/leaf/detail/all.hpp",
"chars": 598,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "include/boost/leaf/detail/demangle.hpp",
"chars": 4667,
"preview": "#ifndef BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED\n#define BOOST_LEAF_DETAIL_DEMANGLE_HPP_INCLUDED\n\n// Copyright 2018-2022 "
},
{
"path": "include/boost/leaf/detail/function_traits.hpp",
"chars": 3466,
"preview": "#ifndef BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED\n#define BOOST_LEAF_DETAIL_FUNCTION_TRAITS_HPP_INCLUDED\n\n// Copyri"
},
{
"path": "include/boost/leaf/detail/mp11.hpp",
"chars": 7707,
"preview": "#ifndef BOOST_LEAF_DETAIL_MP11_HPP_INCLUDED\n#define BOOST_LEAF_DETAIL_MP11_HPP_INCLUDED\n\n// Copyright 2015-2017 Peter D"
},
{
"path": "include/boost/leaf/detail/optional.hpp",
"chars": 4123,
"preview": "#ifndef BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED\n#define BOOST_LEAF_DETAIL_OPTIONAL_HPP_INCLUDED\n\n// Copyright 2018-2022 "
},
{
"path": "include/boost/leaf/detail/print.hpp",
"chars": 3828,
"preview": "#ifndef BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED\n#define BOOST_LEAF_DETAIL_PRINT_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil D"
},
{
"path": "include/boost/leaf/error.hpp",
"chars": 19697,
"preview": "#ifndef BOOST_LEAF_ERROR_HPP_INCLUDED\n#define BOOST_LEAF_ERROR_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski and "
},
{
"path": "include/boost/leaf/exception.hpp",
"chars": 8316,
"preview": "#ifndef BOOST_LEAF_EXCEPTION_HPP_INCLUDED\n#define BOOST_LEAF_EXCEPTION_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchev"
},
{
"path": "include/boost/leaf/handle_errors.hpp",
"chars": 29723,
"preview": "#ifndef BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED\n#define BOOST_LEAF_HANDLE_ERRORS_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil"
},
{
"path": "include/boost/leaf/on_error.hpp",
"chars": 6425,
"preview": "#ifndef BOOST_LEAF_ON_ERROR_HPP_INCLUDED\n#define BOOST_LEAF_ON_ERROR_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevsk"
},
{
"path": "include/boost/leaf/pred.hpp",
"chars": 7851,
"preview": "#ifndef BOOST_LEAF_PRED_HPP_INCLUDED\n#define BOOST_LEAF_PRED_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski and Re"
},
{
"path": "include/boost/leaf/result.hpp",
"chars": 13968,
"preview": "#ifndef BOOST_LEAF_RESULT_HPP_INCLUDED\n#define BOOST_LEAF_RESULT_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski an"
},
{
"path": "include/boost/leaf/to_variant.hpp",
"chars": 1641,
"preview": "#ifndef BOOST_LEAF_TO_VARIANT_HPP_INCLUDED\n#define BOOST_LEAF_TO_VARIANT_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotch"
},
{
"path": "include/boost/leaf.hpp",
"chars": 330,
"preview": "#ifndef BOOST_LEAF_HPP_INCLUDED\n#define BOOST_LEAF_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski and Reverge Stud"
},
{
"path": "index.html",
"chars": 396,
"preview": "<html>\n<head>\n<meta http-equiv=\"refresh\" content=\"0; URL=doc/html/index.html\">\n</head>\n<body>\nAutomatic redirection fail"
},
{
"path": "meson.build",
"chars": 9460,
"preview": "# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n# Distributed under the Boost Software License, Version"
},
{
"path": "meson_options.txt",
"chars": 920,
"preview": "option('leaf_hpp',type:'boolean',value:false,description:'Unit tests #include <boost/leaf.hpp> instead of individual hea"
},
{
"path": "meta/libraries.json",
"chars": 286,
"preview": "{\n \"key\": \"leaf\",\n \"name\": \"LEAF\",\n \"authors\": [\n \"Emil Dotchevski\"\n ],\n \"maintainers\": [\n "
},
{
"path": "subprojects/lua.wrap",
"chars": 402,
"preview": "[wrap-file]\ndirectory=lua-5.1.5\n\nsource_url = http://www.lua.org/ftp/lua-5.1.5.tar.gz\nsource_filename = lua-5.1.5.tar.gz"
},
{
"path": "subprojects/tl_expected.wrap",
"chars": 70,
"preview": "[wrap-git]\nurl = https://github.com/zajo/expected.git\nrevision = head\n"
},
{
"path": "test/BOOST_LEAF_ASSIGN_test.cpp",
"chars": 2111,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/BOOST_LEAF_AUTO_test.cpp",
"chars": 2375,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/BOOST_LEAF_CHECK_test.cpp",
"chars": 1486,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/Jamfile.v2",
"chars": 6856,
"preview": "# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n# Distributed under the Boost Software License, Version"
},
{
"path": "test/_compile-fail-BOOST_LEAF_ASSIGN.cpp",
"chars": 711,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-BOOST_LEAF_AUTO.cpp",
"chars": 698,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_boost_error_info_1.cpp",
"chars": 611,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_boost_error_info_2.cpp",
"chars": 611,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_catch_1.cpp",
"chars": 674,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_catch_2.cpp",
"chars": 668,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_match_1.cpp",
"chars": 674,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_match_2.cpp",
"chars": 668,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-arg_rvalue_ref.cpp",
"chars": 615,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-diagnostic_info.cpp",
"chars": 379,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-error_info.cpp",
"chars": 364,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-exception_1.cpp",
"chars": 374,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-exception_2.cpp",
"chars": 360,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-new_error.cpp",
"chars": 334,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-result_1.cpp",
"chars": 379,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-result_2.cpp",
"chars": 433,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n// Thanks @strager\n\n// Distributed under the Boost Soft"
},
{
"path": "test/_compile-fail-result_3.cpp",
"chars": 459,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n// Thanks @strager\n\n// Distributed under the Boost Soft"
},
{
"path": "test/_compile-fail-result_4.cpp",
"chars": 360,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_compile-fail-verbose_diagnostic_info.cpp",
"chars": 403,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_capture_test.cpp",
"chars": 313,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_common_test.cpp",
"chars": 311,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_config_test.cpp",
"chars": 311,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_context_test.cpp",
"chars": 313,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_error_test.cpp",
"chars": 309,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_exception_test.cpp",
"chars": 317,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_handle_errors_test.cpp",
"chars": 325,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_leaf_test.cpp",
"chars": 297,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_on_error_test.cpp",
"chars": 315,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_pred_test.cpp",
"chars": 307,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_result_test.cpp",
"chars": 311,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_hpp_to_variant_test.cpp",
"chars": 319,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/_test_ec.hpp",
"chars": 5729,
"preview": "#ifndef BOOST_LEAF_TEST_EC_HPP_INCLUDED\n#define BOOST_LEAF_TEST_EC_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevski "
},
{
"path": "test/_test_res.hpp",
"chars": 2371,
"preview": "#ifndef BOOST_LEAF_TEST_RES_HPP_INCLUDED\n#define BOOST_LEAF_TEST_RES_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevsk"
},
{
"path": "test/accumulate_basic_test.cpp",
"chars": 1191,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_error_exception_test.cpp",
"chars": 1589,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_error_result_test.cpp",
"chars": 1350,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_new_error_exception_test.cpp",
"chars": 1788,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_new_error_result_test.cpp",
"chars": 1406,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_success_exception_test.cpp",
"chars": 1198,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/accumulate_nested_success_result_test.cpp",
"chars": 1171,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/boost/core/current_function.hpp",
"chars": 1723,
"preview": "#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED\n#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED\n\n// MS compatible compilers supp"
},
{
"path": "test/boost/core/lightweight_test.hpp",
"chars": 15495,
"preview": "#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP\n#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP\n\n// MS compatible compilers support #pra"
},
{
"path": "test/boost_exception_test.cpp",
"chars": 3018,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_exception_async_test.cpp",
"chars": 4427,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_exception_result_async_test.cpp",
"chars": 4477,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_exception_state_test.cpp",
"chars": 1743,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_exception_unload_test.cpp",
"chars": 5047,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_result_async_test.cpp",
"chars": 4443,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_result_state_test.cpp",
"chars": 1588,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/capture_result_unload_test.cpp",
"chars": 3453,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/context_activator_test.cpp",
"chars": 1317,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/context_deduction_test.cpp",
"chars": 8534,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/ctx_handle_all_test.cpp",
"chars": 1262,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/ctx_handle_some_test.cpp",
"chars": 1194,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/ctx_remote_handle_all_test.cpp",
"chars": 1268,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/ctx_remote_handle_some_test.cpp",
"chars": 1248,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_basic_test.cpp",
"chars": 1546,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_error_exception_test.cpp",
"chars": 1620,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_error_result_test.cpp",
"chars": 1381,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_new_error_exception_test.cpp",
"chars": 1795,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_new_error_result_test.cpp",
"chars": 1413,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_success_exception_test.cpp",
"chars": 1204,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/defer_nested_success_result_test.cpp",
"chars": 1179,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/diagnostic_info_test.cpp",
"chars": 13652,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/diagnostic_info_test2.cpp",
"chars": 3599,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/e_LastError_test.cpp",
"chars": 1505,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/e_errno_test.cpp",
"chars": 1177,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/error_code_test.cpp",
"chars": 17398,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/error_id_test.cpp",
"chars": 3387,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/exception_test.cpp",
"chars": 11878,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/exception_to_result_test.cpp",
"chars": 3233,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/function_traits_test.cpp",
"chars": 1653,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/handle_all_other_result_test.cpp",
"chars": 2297,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/handle_all_test.cpp",
"chars": 21729,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/handle_basic_test.cpp",
"chars": 11001,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/handle_some_other_result_test.cpp",
"chars": 2289,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/handle_some_test.cpp",
"chars": 43605,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/lightweight_test.hpp",
"chars": 585,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/match_member_test.cpp",
"chars": 2676,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/match_test.cpp",
"chars": 6951,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/match_value_test.cpp",
"chars": 2813,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/multiple_errors_test.cpp",
"chars": 1994,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/optional_test.cpp",
"chars": 11142,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_basic_test.cpp",
"chars": 1929,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_exception_test.cpp",
"chars": 3238,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_error_exception_test.cpp",
"chars": 1560,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_error_result_test.cpp",
"chars": 1318,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_new_error_exception_test.cpp",
"chars": 1734,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_new_error_result_test.cpp",
"chars": 1351,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_success_exception_test.cpp",
"chars": 1174,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/preload_nested_success_result_test.cpp",
"chars": 1149,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/print_test.cpp",
"chars": 2479,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/result_bad_result_test.cpp",
"chars": 2452,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/result_implicit_conversion_test.cpp",
"chars": 960,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/result_load_test.cpp",
"chars": 1882,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/result_ref_test.cpp",
"chars": 11486,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/result_state_test.cpp",
"chars": 20097,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/tls_array_alloc_test1.cpp",
"chars": 2345,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/tls_array_alloc_test2.cpp",
"chars": 2421,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/tls_array_alloc_test3.cpp",
"chars": 2535,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/tls_array_test.cpp",
"chars": 3087,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/to_variant_test.cpp",
"chars": 1607,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/try_catch_error_id_test.cpp",
"chars": 1243,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/try_catch_system_error_test.cpp",
"chars": 4055,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/try_catch_test.cpp",
"chars": 15691,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/try_exception_and_result_test.cpp",
"chars": 18170,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/visibility_test.cpp",
"chars": 3163,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/visibility_test_lib.cpp",
"chars": 751,
"preview": "// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n// Distributed under the Boost Software License, Versi"
},
{
"path": "test/visibility_test_lib.hpp",
"chars": 679,
"preview": "#ifndef VISIBILITY_TEST_LIB_HPP_INCLUDED\n#define VISIBILITY_TEST_LIB_HPP_INCLUDED\n\n// Copyright 2018-2022 Emil Dotchevsk"
},
{
"path": "wasm.txt",
"chars": 513,
"preview": "# Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.\n\n# Distributed under the Boost Software License, Version"
}
]
About this extraction
This page contains the full source code of the zajo/leaf GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 185 files (1012.5 KB), approximately 266.8k tokens, and a symbol index with 1313 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.