[libcxx-commits] [libcxx] [libc++] P3168R2 Give std::optional Range Support (PR #146491)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 2 02:46:05 PDT 2025
================
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: std-at-least-c++26
+
+#include <iterator>
+#include <optional>
+
+int main() {
+ using Iter = std::optional<int>::iterator;
----------------
frederick-vs-ja wrote:
Ditto `.compile.pass.cpp`. Please test `const_iterator` together.
https://github.com/llvm/llvm-project/pull/146491
More information about the libcxx-commits
mailing list