[libcxx-commits] [PATCH] D129923: Visual C++ doesn't support C99 compound literal

Igor Zhukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 16 03:50:12 PDT 2022


fsb4000 updated this revision to Diff 445222.
fsb4000 added a comment.

use `_MSVC_STL_VERSION`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129923/new/

https://reviews.llvm.org/D129923

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


Index: libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
===================================================================
--- libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
+++ libcxx/test/std/containers/sequences/array/array.creation/to_array.pass.cpp
@@ -82,6 +82,7 @@
       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 @@
     assert(arr[0] == 3);
     assert(arr[1] == 4);
   }
+#endif // ! _MSVC_STL_VERSION
 
   //  Test explicit type.
   {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129923.445222.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220716/6f9ce20d/attachment.bin>


More information about the libcxx-commits mailing list