[libcxx-commits] [libcxx] [libc++][test] Make `deallocate_size.pass.cpp` MSVC-STL-friendly (PR #165162)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 27 03:59:18 PDT 2025
================
@@ -68,7 +69,11 @@ void test() {
using Str = std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> >;
{
Str s(i, 't');
+#ifdef _MSVC_STL_VERSION // MSVC STL dynamically allocates one container proxy object in debug modes.
+ assert(allocated_ == 0 || allocated_ == 1 || allocated_ >= i);
----------------
philnik777 wrote:
Does this assert provide much value as-is? I feel like it would be much better to move the assertion below into the loop and just drop this assertion. That would make this test actually portable.
https://github.com/llvm/llvm-project/pull/165162
More information about the libcxx-commits
mailing list