Fix test that was failing on C++03 b/c it was using initializer lists
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f8edc478b
commit
b6d12a2b3a
@ -20,6 +20,7 @@
|
|||||||
template <typename Vec>
|
template <typename Vec>
|
||||||
void test ( Vec &v )
|
void test ( Vec &v )
|
||||||
{
|
{
|
||||||
|
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||||
v.assign({3, 4, 5, 6});
|
v.assign({3, 4, 5, 6});
|
||||||
assert(v.size() == 4);
|
assert(v.size() == 4);
|
||||||
assert(is_contiguous_container_asan_correct(v));
|
assert(is_contiguous_container_asan_correct(v));
|
||||||
@ -27,11 +28,11 @@ void test ( Vec &v )
|
|||||||
assert(v[1] == 4);
|
assert(v[1] == 4);
|
||||||
assert(v[2] == 5);
|
assert(v[2] == 5);
|
||||||
assert(v[3] == 6);
|
assert(v[3] == 6);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
{
|
{
|
||||||
typedef std::vector<int> V;
|
typedef std::vector<int> V;
|
||||||
V d1;
|
V d1;
|
||||||
@ -51,5 +52,4 @@ int main()
|
|||||||
test(d2);
|
test(d2);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user