[libcxx-commits] [libcxx] [libc++] Update the status for lwg-3120 (PR #116772)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 15 09:14:43 PST 2025
================
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// UNSUPPORTED: availability-pmr-missing
+
+// <memory_resource>
+
+// class monotonic_buffer_resource
+
+#include <memory_resource>
+#include <cassert>
+#include <tuple> // std::ignore
+
+#include "count_new.h"
+#include "test_macros.h"
+
+int main(int, char**) {
+ {
+ // https://cplusplus.github.io/LWG/issue3120
+ {
+ // when init given a next buffer size, after release(), reset/not change next buffer size from initial state
+ constexpr auto expect_next_buffer_size{512ULL};
+ std::pmr::monotonic_buffer_resource mr{nullptr, expect_next_buffer_size, std::pmr::new_delete_resource()};
+
+ for (auto i{0}; i < 100; ++i) {
+ std::ignore = mr.allocate(1);
----------------
frederick-vs-ja wrote:
I think we conventionally use `(void)` cast to ignore expressions in libc++ tests.
https://github.com/llvm/llvm-project/pull/116772
More information about the libcxx-commits
mailing list