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:
Marshall Clow 2015-05-16 17:10:49 +00:00
parent 4f8edc478b
commit b6d12a2b3a

View File

@ -20,6 +20,7 @@
template <typename Vec>
void test ( Vec &v )
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
v.assign({3, 4, 5, 6});
assert(v.size() == 4);
assert(is_contiguous_container_asan_correct(v));
@ -27,11 +28,11 @@ void test ( Vec &v )
assert(v[1] == 4);
assert(v[2] == 5);
assert(v[3] == 6);
#endif
}
int main()
{
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef std::vector<int> V;
V d1;
@ -51,5 +52,4 @@ int main()
test(d2);
}
#endif
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}