From d327c083ffe9d280ce68b8065e592f4725dc0e54 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 1 Jun 2025 03:22:57 +0200 Subject: [PATCH] Fix some typos --- doc/leaf.adoc | 8 ++++---- doc/whitepaper.md | 4 ++-- example/print_file/readme.md | 2 +- example/readme.md | 2 +- include/boost/leaf/detail/demangle.hpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/leaf.adoc b/doc/leaf.adoc index ed4517ad..cbb7f33b 100644 --- a/doc/leaf.adoc +++ b/doc/leaf.adoc @@ -401,7 +401,7 @@ leaf::result r = leaf::try_handle_some( 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, the second error handler will be used if an error object of type `io_error` is available; * 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: @@ -3161,7 +3161,7 @@ The `throw_exception` function is overloaded: it can be invoked with no argument ** its `std::exception` subobject is default-initialized; ** its `error_id` subobject is initialized by `<>(std::forward(e1), std::forward(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: +<3> If the function 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 `<>()`. @@ -4025,7 +4025,7 @@ namespace boost { namespace leaf { These functions have the usual semantics, comparing `a.value()` and `b.value()`. -NOTE: The exact strict weak ordering implemented by `operator<` is not specified. In particular, if for two `error_id` objects `a` and `b`, `a < b` is true, it does not follow that the failure identified by `a` ocurred earlier than the one identified by `b`. +NOTE: The exact strict weak ordering implemented by `operator<` is not specified. In particular, if for two `error_id` objects `a` and `b`, `a < b` is true, it does not follow that the failure identified by `a` occurred earlier than the one identified by `b`. ''' @@ -4723,7 +4723,7 @@ Effects: [[result::value_type]] ==== `value_type` -A member type of `result`, defined as a synonim for `T`. +A member type of `result`, defined as a synonym for `T`. ''' diff --git a/doc/whitepaper.md b/doc/whitepaper.md index 6af95b31..d7e49cfe 100644 --- a/doc/whitepaper.md +++ b/doc/whitepaper.md @@ -241,7 +241,7 @@ The above function computes a `float` value based on the contents of the specifi In case of failure to `open()`, our function stays out of the way: the error code is communicated from `open()` (which sets the `errno`) *directly* to an *error handling* function up the call stack (which examines the `errno` in order to understand the failure), while the return value of each intermediate function needs only communicate a single bit of data (the *failure flag*). -The major drawback of this appoach is that the *failure flag* is not communicated uniformly, which means that *error neutral* functions can't check for errors generically (e.g. each layer needs to know about the different `INVALID_VALUE`s). +The major drawback of this approach is that the *failure flag* is not communicated uniformly, which means that *error neutral* functions can't check for errors generically (e.g. each layer needs to know about the different `INVALID_VALUE`s). ### 6.2. C++ Exceptions @@ -357,7 +357,7 @@ Using LEAF, *error handling* functions match error objects similarly to the way * Each handler can specify multiple objects to be matched by type, rather than only one. * The error objects are matched dynamically, but solely based on their static type. This allows *all* error objects to be allocated on the stack, using automatic storage duration. -Whithout exception handling, this is achieved using the following syntax: +Without exception handling, this is achieved using the following syntax: ```c++ leaf::handle_all( diff --git a/example/print_file/readme.md b/example/print_file/readme.md index 050e1f6f..702580ef 100644 --- a/example/print_file/readme.md +++ b/example/print_file/readme.md @@ -1,6 +1,6 @@ # Print File Example -This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementaiton. +This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementation. * [print_file_leaf_result.cpp](./print_file_leaf_result.cpp) reports errors with `leaf::result`, using an error code `enum` for classification of failures. diff --git a/example/readme.md b/example/readme.md index 8b5f4086..d783ac67 100644 --- a/example/readme.md +++ b/example/readme.md @@ -1,6 +1,6 @@ # Example Programs Using LEAF to Handle Errors -* [print_file](./print_file): This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementaiton. +* [print_file](./print_file): This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementation. * [try_capture_all_result.cpp](https://github.com/boostorg/leaf/blob/master/example/try_capture_all_result.cpp?ts=4): Shows how to transport error objects between threads in a `leaf::result` object without using exception handling. * [try_capture_all_exceptions.cpp](https://github.com/boostorg/leaf/blob/master/example/try_capture_all_exceptions.cpp?ts=4): Shows how to transport error objects between threads in a `leaf::result` object using exception handling. diff --git a/include/boost/leaf/detail/demangle.hpp b/include/boost/leaf/detail/demangle.hpp index 0465b877..3562b475 100644 --- a/include/boost/leaf/detail/demangle.hpp +++ b/include/boost/leaf/detail/demangle.hpp @@ -33,7 +33,7 @@ #if defined(BOOST_LEAF_HAS_CXXABI_H) # include -// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library +// For some architectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library // (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement // abi::__cxa_demangle(). We detect this implementation by checking the include guard here. # if defined(__GABIXX_CXXABI_H__)