[libcxx-commits] [libcxx] [libc++] Partially implement P2846R6: `reserve_hint` (PR #206385)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 13 06:40:17 PDT 2026
================
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// Test the libc++-specific behavior that the call operator of the
+// std::ranges::reserve_hint customization point object is static.
+
+#include <cstddef>
+#include <ranges>
+
+using RangeReserveHintT = decltype(std::ranges::reserve_hint);
+
+extern int bounded_array[42];
+
+struct HasSizeMember {
----------------
philnik777 wrote:
`WithSizeMember` would be a bit better I think, but no strong feelings.
https://github.com/llvm/llvm-project/pull/206385
More information about the libcxx-commits
mailing list