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

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 13 16:53:50 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.
----------------
inquisitivecrystal wrote:

@Zingam said "Every part of a signature needs to be tested: [[nodiscard]], return type, constness, noexcept, etc." Staticness is part of the signature so I thought I needed to test it?

Also, it does impact performance if the call isn't inlined and is visible to users.


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


More information about the libcxx-commits mailing list