forked from OSchip/llvm-project
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
This commit is contained in:
parent
844a320ccd
commit
9aea9ab83d
|
@ -82,6 +82,7 @@ constexpr bool tests()
|
||||||
assert(arr[i].get() == i && source[i].get() == 0);
|
assert(arr[i].get() == i && source[i].get() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _MSVC_STL_VERSION
|
||||||
// Test C99 compound literal.
|
// Test C99 compound literal.
|
||||||
{
|
{
|
||||||
auto arr = std::to_array((int[]){3, 4});
|
auto arr = std::to_array((int[]){3, 4});
|
||||||
|
@ -89,6 +90,7 @@ constexpr bool tests()
|
||||||
assert(arr[0] == 3);
|
assert(arr[0] == 3);
|
||||||
assert(arr[1] == 4);
|
assert(arr[1] == 4);
|
||||||
}
|
}
|
||||||
|
#endif // ! _MSVC_STL_VERSION
|
||||||
|
|
||||||
// Test explicit type.
|
// Test explicit type.
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue