[libcxx-commits] [libcxx] 9aea9ab - Visual C++ doesn't support C99 compound literal

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 16 10:47:51 PDT 2022


Author: Igor Zhukov
Date: 2022-07-16T19:47:45+02:00
New Revision: 9aea9ab83dc047b0361520df572062783b8497e3

URL: https://github.com/llvm/llvm-project/commit/9aea9ab83dc047b0361520df572062783b8497e3
DIFF: https://github.com/llvm/llvm-project/commit/9aea9ab83dc047b0361520df572062783b8497e3.diff

LOG: Visual C++ doesn't support C99 compound literal

Fix test libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D129923

Added: 
    

Modified: 
    libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp b/libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
index 3ed6cfc493c4d..778fae1ced383 100644
--- a/libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
@@ -82,6 +82,7 @@ constexpr bool tests()
       assert(arr[i].get() == i && source[i].get() == 0);
   }
 
+#ifndef _MSVC_STL_VERSION
   // Test C99 compound literal.
   {
     auto arr = std::to_array((int[]){3, 4});
@@ -89,6 +90,7 @@ constexpr bool tests()
     assert(arr[0] == 3);
     assert(arr[1] == 4);
   }
+#endif // ! _MSVC_STL_VERSION
 
   //  Test explicit type.
   {


        


More information about the libcxx-commits mailing list