[libcxx-commits] [libcxx] [libc++] Partially implement P2846R6: `reserve_hint` (PR #206385)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 7 00:08:17 PDT 2026


================
@@ -139,6 +140,30 @@ class adjacent_view : public view_interface<adjacent_view<_View, _Np>> {
     __sz -= std::min<_CT>(__sz, _Np - 1);
     return static_cast<_ST>(__sz);
   }
+
+#  if _LIBCPP_STD_VER >= 26
+
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto reserve_hint()
+    requires approximately_sized_range<_View>
+  {
+    using _ST = decltype(ranges::reserve_hint(__base_));
----------------
philnik777 wrote:

Why does this diverge from the wording?

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


More information about the libcxx-commits mailing list