[libcxx-commits] [libcxx] [libc++] Resolve LWG4308, correct `iterator` availability for `optional<T&>` (PR #173948)
William Tran-Viet via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 30 12:46:02 PST 2025
================
@@ -19,6 +19,12 @@
#include <type_traits>
#include <utility>
+template <typename T>
+concept has_iterator = requires {
+ typename T::iterator;
+ typename T::const_iterator;
----------------
smallp-o-p wrote:
IMO, since the fix is pretty simple and we'd be adding all the testing stuff required for it, I included it in this PR.
https://github.com/llvm/llvm-project/pull/173948
More information about the libcxx-commits
mailing list