[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
Tue Oct 28 06:08:13 PDT 2025


================
@@ -12,12 +12,13 @@
 
 #include <string>
 #include <cassert>
+#include <cstddef>
 #include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
 
-static int allocated_;
+static std::ptrdiff_t allocated_;
----------------
philnik777 wrote:

Does that make a difference in practice? We're checking for equality, so what exactly the value is doesn't really matter. I guess we could also have two variables to track allocation and deallocation separately and compare them to be equal. I don't really mind either way.

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


More information about the libcxx-commits mailing list