[libcxx-commits] [libcxx] [libc++] Implement a type-safe iterator for optional (PR #154239)

William Tran-Viet via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 14 18:58:50 PST 2026


================
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <optional>
+
+// Add to iterator out of bounds.
+
+// REQUIRES: std-at-least-c++26
+// UNSUPPORTED: libcpp-hardening-mode=none, libcpp-has-abi-bounded-iterators-in-optional
----------------
smallp-o-p wrote:

I realize we *don't* have tests which check the `bounded_iter` case. I'll put up another PR to add those. 

https://github.com/llvm/llvm-project/pull/154239


More information about the libcxx-commits mailing list