summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp
diff options
context:
space:
mode:
authorStephan T. Lavavej <stl@exchange.microsoft.com>2016-12-06 01:13:14 +0000
committerStephan T. Lavavej <stl@exchange.microsoft.com>2016-12-06 01:13:14 +0000
commit68a694b800a9bb5f5cbbc5d8c956a87273356d20 (patch)
treea430a87c856cde5972651895df9f274cdd98a9e3 /libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp
parentfbfb2ab63e94f1b0c248cd810ae3fb35889d99b6 (diff)
downloadbcm5719-llvm-68a694b800a9bb5f5cbbc5d8c956a87273356d20.tar.gz
bcm5719-llvm-68a694b800a9bb5f5cbbc5d8c956a87273356d20.zip
[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. llvm-svn: 288746
Diffstat (limited to 'libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp')
-rw-r--r--libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp
index 7363508943b..4d0015343e9 100644
--- a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp
+++ b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp
@@ -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());
}
}
OpenPOWER on IntegriCloud