mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +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:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <valarray>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -26,6 +27,6 @@ int main()
|
||||
const unsigned N = sizeof(a)/sizeof(a[0]);
|
||||
const std::valarray<T> v(a, N);
|
||||
assert(v[v.size()-1] == 5);
|
||||
assert(end(v) - begin(v) == v.size());
|
||||
assert(static_cast<std::size_t>(end(v) - begin(v)) == v.size());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user