Skip to content

Commit 9aea9ab

Browse files
fsb4000mordante
authored andcommitted
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
1 parent 844a320 commit 9aea9ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ constexpr bool tests()
8282
assert(arr[i].get() == i && source[i].get() == 0);
8383
}
8484

85+
#ifndef _MSVC_STL_VERSION
8586
// Test C99 compound literal.
8687
{
8788
auto arr = std::to_array((int[]){3, 4});
8889
ASSERT_SAME_TYPE(decltype(arr), std::array<int, 2>);
8990
assert(arr[0] == 3);
9091
assert(arr[1] == 4);
9192
}
93+
#endif // ! _MSVC_STL_VERSION
9294

9395
// Test explicit type.
9496
{

0 commit comments

Comments
 (0)