[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 06:33:46 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:
Is this cast actually required now to make MSVC happy? It's an implicit conversion technically I guess, but it's guaranteed to be lossless.
https://github.com/llvm/llvm-project/pull/165162
More information about the libcxx-commits
mailing list