Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,7 +24,7 @@ int main()
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef test_allocator<int> A;
|
||||
typedef test_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
@@ -39,7 +39,7 @@ int main()
|
||||
}
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef other_allocator<int> A;
|
||||
typedef other_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
@@ -55,7 +55,7 @@ int main()
|
||||
#if __cplusplus >= 201103L
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef min_allocator<int> A;
|
||||
typedef min_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
|
||||
@@ -24,7 +24,7 @@ int main()
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef test_allocator<int> A;
|
||||
typedef test_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
@@ -39,7 +39,7 @@ int main()
|
||||
}
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef test_allocator<int> A;
|
||||
typedef test_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
@@ -55,7 +55,7 @@ int main()
|
||||
#if __cplusplus >= 201103L
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef min_allocator<int> A;
|
||||
typedef min_allocator<T> A;
|
||||
typedef std::forward_list<T, A> C;
|
||||
T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
typedef std::move_iterator<T*> I;
|
||||
|
||||
Reference in New Issue
Block a user