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

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 28 22:08:06 PDT 2026


================
@@ -0,0 +1,130 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+
+// constexpr auto reserve_hint()
+//     requires approximately_sized_range<InnerView>;
+// constexpr auto reserve_hint() const
+//     requires approximately_sized_range<const InnerView>;
+
+#include <cassert>
+#include <ranges>
+#include <utility>
+
+#include "test_macros.h"
+#include "test_iterators.h"
+#include "helpers.h"
----------------
Zingam wrote:

Includes should be sorted in alphabetical order.

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


More information about the libcxx-commits mailing list