[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


================
@@ -65,13 +66,11 @@ struct test_alloc {
 
 template <class Sz>
 void test() {
-  using Str = std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> >;
   for (int i = 1; i < 1000; ++i) {
     {
-      Str s(i, 't');
-      (void)s;
+      TEST_MAYBE_UNUSED std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> > s(i, 't');
----------------
philnik777 wrote:

Sorry for flip-flopping, but let's just use a void cast. I forgot this was a standard test and pre-C++17.

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


More information about the libcxx-commits mailing list