[libcxx-commits] [libcxx] [libc++][test] Make `deallocate_size.pass.cpp` MSVC-friendly (PR #165162)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 29 12:02:21 PDT 2025


================
@@ -41,12 +42,12 @@ struct test_alloc {
   TEST_CONSTEXPR test_alloc(const test_alloc<U, Sz>&) TEST_NOEXCEPT {}
 
   pointer allocate(size_type n, const void* = nullptr) {
-    allocated_ += static_cast<std::ptrdiff_t>(n);
+    allocated_ += static_cast<std::size_t>(n);
----------------
philnik777 wrote:

Can we switch the counter to the biggest `size_type` then?

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


More information about the libcxx-commits mailing list