[libcxx] r242633 - Fix warnings in forwardlist
Eric Fiselier
eric at efcs.ca
Sat Jul 18 17:38:37 PDT 2015
Author: ericwf
Date: Sat Jul 18 19:38:37 2015
New Revision: 242633
URL: http://llvm.org/viewvc/llvm-project?rev=242633&view=rev
Log:
Fix warnings in forwardlist
Modified:
libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp
libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp
Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp?rev=242633&r1=242632&r2=242633&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp Sat Jul 18 19:38:37 2015
@@ -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;
Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp?rev=242633&r1=242632&r2=242633&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp Sat Jul 18 19:38:37 2015
@@ -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);
Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp?rev=242633&r1=242632&r2=242633&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp Sat Jul 18 19:38:37 2015
@@ -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);
More information about the cfe-commits
mailing list