Fix warnings in forwardlist
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18dbed9596
commit
6af41ab8c2
@ -15,6 +15,7 @@
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
typedef int T;
|
||||
@ -44,7 +45,6 @@ tests(const C& c, int p, int f)
|
||||
{
|
||||
typename C::const_iterator i = c.begin();
|
||||
int n = 0;
|
||||
int d = 1;
|
||||
if (p == f || p == f+1)
|
||||
{
|
||||
for (n = 0; n < size_t1; ++n, ++i)
|
||||
@ -106,7 +106,7 @@ int main()
|
||||
}
|
||||
}
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
// splicing different containers
|
||||
typedef std::forward_list<T, min_allocator<T>> C;
|
||||
|
@ -22,12 +22,12 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
template <class C>
|
||||
void test(int N, int M)
|
||||
{
|
||||
typedef typename C::value_type T;
|
||||
C c1;
|
||||
for (int i = 0; i < N; ++i)
|
||||
c1.push_front(i);
|
||||
@ -52,7 +52,7 @@ int main()
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int> >(i, j);
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int, min_allocator<int>> >(i, j);
|
||||
|
@ -30,12 +30,12 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
template <class C>
|
||||
void test(int N, int M)
|
||||
{
|
||||
typedef typename C::value_type T;
|
||||
C c1;
|
||||
for (int i = 0; i < N; ++i)
|
||||
c1.push_front(i);
|
||||
@ -57,7 +57,7 @@ int main()
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int> >(i, j);
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int, min_allocator<int>> >(i, j);
|
||||
|
Loading…
x
Reference in New Issue
Block a user