[libcxx] [test] D27022: Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.

Add static_cast<std::size_t> to more comparisons. (Performed manually, unlike part 8/12.)

Also, include <cstddef> when it wasn't already being included.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2016-12-06 01:13:14 +00:00
parent 98605940df
commit 21208822a8
23 changed files with 69 additions and 49 deletions

View File

@@ -14,6 +14,7 @@
#include <string>
#include <cassert>
#include <cstddef>
#include "min_allocator.h"
@@ -29,8 +30,8 @@ test(S s)
assert(e == s.begin());
assert(ce == cs.begin());
}
assert(e - s.begin() == s.size());
assert(ce - cs.begin() == cs.size());
assert(static_cast<std::size_t>(e - s.begin()) == s.size());
assert(static_cast<std::size_t>(ce - cs.begin()) == cs.size());
}
int main()