diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-03 02:02:07 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-03 02:02:07 +0000 |
commit | 04732df052cb091f2374a6927e470064727ff4c8 (patch) | |
tree | c061fa674f9b9f6244eda3c1b335bcb50dd9e817 | |
parent | 778ec30428f6818514c9ff4ebf5ca8db0d84de91 (diff) | |
download | external_libcxx-04732df052cb091f2374a6927e470064727ff4c8.tar.gz external_libcxx-04732df052cb091f2374a6927e470064727ff4c8.tar.bz2 external_libcxx-04732df052cb091f2374a6927e470064727ff4c8.zip |
Fix sign-compare warning in test; Oddly this only appears on OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296851 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp index 6a1afe133..5f5f5d0ae 100644 --- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp +++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <forward_list> // forward_list(forward_list&& x, const allocator_type& a); @@ -21,7 +23,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef test_allocator<T> A; @@ -33,7 +34,7 @@ int main() unsigned n = 0; for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) assert(*i == n); - assert(n == std::end(t) - std::begin(t)); + assert(n == static_cast<unsigned>(std::end(t) - std::begin(t))); assert(c0.empty()); assert(c.get_allocator() == A(10)); } @@ -48,11 +49,10 @@ int main() unsigned n = 0; for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) assert(*i == n); - assert(n == std::end(t) - std::begin(t)); + assert(n == static_cast<unsigned>(std::end(t) - std::begin(t))); assert(!c0.empty()); assert(c.get_allocator() == A(9)); } -#if TEST_STD_VER >= 11 { typedef MoveOnly T; typedef min_allocator<T> A; @@ -64,10 +64,8 @@ int main() unsigned n = 0; for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) assert(*i == n); - assert(n == std::end(t) - std::begin(t)); + assert(n == static_cast<unsigned>(std::end(t) - std::begin(t))); assert(c0.empty()); assert(c.get_allocator() == A()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |