[libcxx-commits] [PATCH] D138413: [libc++] Enable segmented iterator optimizations for join_view::iterator

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 30 12:32:15 PST 2022


philnik added inline comments.


================
Comment at: libcxx/include/__ranges/join_view.h:428-430
+    if (!__iter.__inner_.has_value())
+      return ranges::end(*--__iter.__outer_);
+    return *__iter.__inner_;
----------------
ldionne wrote:
> Suggestion? I was thrown off by the `*__iter.__inner_;`, I thought you were dereferencing the iterator instead of the optional.
Unfortunately `optional::or_else` only available in C++23.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138413/new/

https://reviews.llvm.org/D138413



More information about the libcxx-commits mailing list