[libcxx-commits] [libcxx] [libc++][Docs] Document `std::optional` hardening (PR #218173)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 22 17:40:30 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: William Tran-Viet (smallp-o-p)
<details>
<summary>Changes</summary>
Resolves #<!-- -->218041
---
Full diff: https://github.com/llvm/llvm-project/pull/218173.diff
1 Files Affected:
- (modified) libcxx/docs/Hardening.rst (+6)
``````````diff
diff --git a/libcxx/docs/Hardening.rst b/libcxx/docs/Hardening.rst
index 1360518379aef..0237a0e73aba0 100644
--- a/libcxx/docs/Hardening.rst
+++ b/libcxx/docs/Hardening.rst
@@ -440,6 +440,12 @@ CMake configuration time. The available options are:
ABI impact: changes the iterator type of ``std::array``, its size and its layout.
+- ``_LIBCPP_ABI_BOUNDED_ITERATORS_IN_OPTIONAL`` -- changes the iterator type of ``std::optional`` to a
+ bounded iterator that keeps track of whether it's within the bounds of its container and asserts it
+ on every dereference and when performing iterator arithmetic.
+
+ ABI impact: changes the iterator type of ``std::optional``.
+
ABI tags
--------
``````````
</details>
https://github.com/llvm/llvm-project/pull/218173
More information about the libcxx-commits
mailing list