mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 16:37:40 +08:00
[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:
@@ -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()
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
#include "min_allocator.h"
|
||||
|
||||
@@ -29,8 +30,8 @@ test(S s)
|
||||
assert(e == s.rbegin());
|
||||
assert(ce == cs.rbegin());
|
||||
}
|
||||
assert(e - s.rbegin() == s.size());
|
||||
assert(ce - cs.rbegin() == cs.size());
|
||||
assert(static_cast<std::size_t>(e - s.rbegin()) == s.size());
|
||||
assert(static_cast<std::size_t>(ce - cs.rbegin()) == cs.size());
|
||||
}
|
||||
|
||||
int main()
|
||||
|
Reference in New Issue
Block a user