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 | 412e9dbc600d6bd43b9d78e9aff436fbf3a11c06 (patch) | |
tree | c9365943355d7a2f852be3f73c26bde6951f023b | |
parent | 7935a2246e3ccf9719283806ad45c84db8361e05 (diff) | |
download | bcm5719-llvm-412e9dbc600d6bd43b9d78e9aff436fbf3a11c06.tar.gz bcm5719-llvm-412e9dbc600d6bd43b9d78e9aff436fbf3a11c06.zip |
Fix sign-compare warning in test; Oddly this only appears on OS X
llvm-svn: 296851
-rw-r--r-- | libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp index 6a1afe1334b..5f5f5d0aef6 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp +++ b/libcxx/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 } |